:root {
  --checkmark-color: var(--brand-primary);
}
main > section {
  padding-inline: var(--page);
}

menu li:first-child a {
  display: inline-flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: center;
  padding-inline: 1.375rem;
  border-radius: 0.375rem;
  background: var(--brand-primary);
  color: var(--surface-default);
  font-weight: 600;
  box-shadow: 0 0.5rem 1.375rem rgba(7, 27, 74, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --checkmark-color: rgb(11, 23, 48);
  }
  body main > section:first-child {
    background:
      radial-gradient(circle at 86% 15%, rgba(46, 217, 255, 0.12), transparent 26%),
      linear-gradient(180deg, var(--surface-default), #17243a);
  }

  body main > section:first-child > aside,
  body main > section:nth-child(2) article,
  body #free-audit {
    background-color: #0b1730;
    color: #f5f9ff;
  }

  body main > section:first-child > aside li,
  body main > section:nth-child(2) article p,
  body #free-audit p {
    color: #dce8fa;
  }

  body .site-header .header-action,
  body menu li:first-child a,
  body #free-audit button {
    background: #2ed9ff;
    color: #03194d;
  }

  body#results {
    main > section:first-child > header p,
    article > p {
      color: var(--body-muted-text);
    }

    article {
      border-color: var(--surface-border);

      li {
        border-color: var(--surface-border);
      }

      li p {
        color: var(--body-text);
      }

      dl {
        color: var(--body-muted-text);
      }

      li[data-status="pass"] > span {
        color: var(--success-indicator);
      }

      li[data-status="warn"] > span,
      li[data-status="fail"] > span {
        color: var(--danger-indicator);
      }
    }
  }
}

main > section:first-child {
  min-height: 38rem;
  display: flex;
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  flex-wrap: wrap;
  padding-block: clamp(4.5rem, 10vw, 8.25rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 15%, rgba(46, 217, 255, 0.18), transparent 26%),
    linear-gradient(180deg, var(--surface-default), #f6fbfe);

  > div {
    flex: 1 1 35rem;
    max-width: 47.5rem;

    > p {
      max-width: 41rem;
      margin-bottom: 2.125rem;
      color: var(--text-muted);
      font-size: clamp(1.125rem, 1.6vw, 1.375rem);
      line-height: 1.55;
    }
  }

  > aside {
    flex: 1 1 22rem;
    max-width: 29.5rem;
    position: relative;
    padding: clamp(1.75rem, 4vw, 2.875rem);
    border-radius: 0.875rem;
    background: var(--brand-primary);
    color: var(--surface-default);
    box-shadow:
      1.625rem 1.625rem 0 var(--highlight-primary),
      0 1.5rem 4.5rem rgba(7, 27, 74, 0.16);
  }
}

small {
  display: block;
  margin-bottom: 1.25rem;
  color: #116c83;
  font-size: 0.8125rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 47.5rem;
  margin-bottom: 1.75rem;
  color: var(--brand-primary);
  font-size: clamp(3.25rem, 7vw, 5.5rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;

  li {
    list-style: none;

    &:first-child a {
      min-height: 3.625rem;
      padding-inline: 1.75rem;
    }

    &:last-child a {
      border-bottom: 0.125rem solid var(--highlight-primary);
      color: var(--brand-primary);
      font-weight: 800;
    }
  }
}

main > section:first-child aside small,
#free-audit > div small {
  color: var(--accent-primary);
}

main > section:first-child aside {
  h2 {
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    line-height: 1.2;
  }

  ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.625rem 0 0;
    padding: 0;
    list-style: none;
  }

  li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #dce8fa;

    &::before {
      content: "✓";
      width: 1.55rem;
      height: 1.55rem;
      flex: 0 0 1.55rem;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: var(--accent-primary);
      color: var(--checkmark-color);
      font-size: 0.8rem;
      font-weight: 900;
    }
  }
}

main > section:nth-child(2) {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 1px;
  padding-block: 0;
  background: var(--accent-primary);
  color: var(--surface-default);

  article {
    min-height: 9.75rem;
    flex: 1 1 16rem;
    padding: 2.125rem clamp(1.5rem, 4vw, 3.5rem);
    background: var(--brand-primary);
  }

  strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--accent-primary);
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.0625rem;
  }
}

#audit, #how-it-works {
  padding-block: clamp(5rem, 9vw, 7.75rem);

  > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 3.25rem;

    > p {
      max-width: 29rem;
      margin: 0;
      color: var(--text-muted);
      font-size: 1.125rem;
    }
  }

  > .audit-coverage,
  > .audit-areas {
    display: flex;
    align-items: stretch;
    gap: 1.125rem;
    flex-wrap: wrap;
  }

  > .audit-coverage {
    margin-bottom: 1.125rem;

    article {
      flex: 1 1 20rem;
      display: flex;
      flex-direction: column;
      padding: 1.875rem;
      border: 1px solid var(--surface-border);
      border-radius: 0.625rem;
      background: var(--brand-primary);
      color: var(--surface-default);
      box-shadow: 0 0.875rem 2.75rem rgba(7, 27, 74, 0.08);

      small {
        margin-bottom: 1rem;
        color: var(--audit-coverage-accent);
      }

      h3 {
        margin-bottom: 0.75rem;
        color: var(--surface-default);
        font-size: 1.5rem;
        line-height: 1.2;
      }

      p {
        margin: 0 0 1.5rem;
        color: var(--audit-coverage-text);
      }

      ul {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin: auto 0 0;
        padding: 1.25rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        list-style: none;
      }

      li {
        display: flex;
        align-items: flex-start;
        gap: 0.625rem;
        color: var(--audit-coverage-text);

        &::before {
          content: "✓";
          flex: 0 0 auto;
          color: var(--accent-primary);
          font-weight: 900;
        }
      }
    }
  }

  > .audit-areas-title {
    margin: 2.75rem 0 1.25rem;
    color: var(--brand-primary);
    font-size: 1.375rem;
    line-height: 1.25;
  }

  > .audit-areas {
    article {
      min-height: 19rem;
      flex: 1 1 16rem;
      display: flex;
      flex-direction: column;
      padding: 1.875rem;
      border: 1px solid var(--surface-border);
      border-radius: 0.625rem;
      background: var(--surface-default);
      box-shadow: 0 0.875rem 2.75rem rgba(7, 27, 74, 0.06);

      > span {
        width: 2.875rem;
        height: 2.875rem;
        display: grid;
        place-items: center;
        margin-bottom: 2.875rem;
        border-radius: 0.5rem;
        background: var(--surface-subtle);
        color: var(--audit-step-number);
        font-size: 0.875rem;
        font-weight: 900;
      }

      &:nth-child(2) > span {
        background: var(--accent-primary);
        color: var(--audit-accent-number);
      }

      &:nth-child(3) > span {
        background: var(--highlight-primary);
        color: var(--audit-accent-number);
      }

      p {
        margin: 0;
        color: var(--text-muted);
      }
    }

    h3 {
      margin-bottom: 0.75rem;
      color: var(--brand-primary);
      font-size: 1.375rem;
      line-height: 1.25;
    }
  }
}

#audit h2,
#services h2,
main > section:nth-child(4) h2 {
  max-width: 47.5rem;
  margin-bottom: 0;
  color: var(--brand-primary);
  font-size: clamp(2.375rem, 4.6vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1.06;
}

main > section:nth-child(4) {
  display: flex;
  align-items: flex-start;
  gap: clamp(3rem, 8vw, 7rem);
  flex-wrap: wrap;
  padding-block: clamp(4.5rem, 8vw, 6.5rem);
  background: var(--brand-primary);
  color: var(--surface-default);

  > div {
    flex: 1 1 35rem;
  }

  small {
    color: var(--accent-primary);
  }

  h2 {
    color: var(--surface-default);
  }

  ul {
    flex: 1 1 25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);

    &:first-child {
      border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    strong {
      color: var(--accent-primary);
    }

    span {
      max-width: 18rem;
      color: #cbd9ed;
    }
  }
}

#services {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2.5rem, 8vw, 7rem);
  flex-wrap: wrap;
  padding-block: clamp(4.5rem, 8vw, 6.5rem);
  background: var(--surface-subtle);

  > div {
    flex: 1 1 35rem;

    > p {
      max-width: 43rem;
      margin: 1.5rem 0 0;
      color: var(--text-muted);
      font-size: 1.125rem;
    }
  }

  aside {
    max-width: 31rem;
    flex: 1 1 22rem;
    padding: 2rem;
    border: 1px dashed #8fa7ba;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.58);

    small {
      margin-bottom: 0.75rem;
    }

    h3 {
      margin-bottom: 0.6rem;
      color: var(--brand-primary);
      font-size: 1.3125rem;
    }

    p {
      margin: 0;
      color: var(--text-muted);
    }
  }
}

#how-it-works {
  background: var(--surface-subtle);
}


#console, #how-it-works {
  padding-block: clamp(4.5rem, 8vw, 6.5rem);

  > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;

    > div {
      flex: 1 1 32rem;
    }

    > p {
      max-width: 29rem;
      margin: 0;
      color: var(--text-muted);
      font-size: 1.125rem;
    }
  }

  h2 {
    max-width: 47.5rem;
    margin: 0;
    color: var(--brand-primary);
    font-size: clamp(2.375rem, 4.6vw, 4rem);
    letter-spacing: -0.05em;
    line-height: 1.06;
  }

  small {
    color: #116c83;
  }

  .console-showcase {
    display: flex;
    align-items: stretch;
    gap: 1.125rem;
    flex-wrap: wrap;
  }

  figure {
    min-width: 0;
    flex: 1 1 21.5rem;
    margin: 0;
    padding: 0.5rem;
    border: 1px solid var(--surface-border);
    border-radius: 0.625rem;
    background: var(--surface-default);
    box-shadow: 0 0.875rem 2.75rem rgba(7, 27, 74, 0.08);
  }

  .console-image-button {
    display: block;
    width: 100%;
    aspect-ratio: 3016 / 1538;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;

    &:focus-visible {
      outline: 0.1875rem solid var(--highlight-primary);
      outline-offset: 0.2rem;
    }
  }

  img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.375rem;
  }

  figcaption {
    padding: 1rem 0.5rem 0.25rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.4;
  }

}

#free-audit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.75rem;
  flex-wrap: wrap;
  padding-block: clamp(4.25rem, 8vw, 6.5rem);
  background:
    linear-gradient(90deg, transparent 0 76%, rgba(46, 217, 255, 0.12) 76%),
    var(--brand-primary);
  color: var(--surface-default);

  > div {
    flex: 1 1 32rem;
    max-width: 51rem;
  }

  h2 {
    margin-bottom: 0.875rem;
    color: var(--on-dark-heading);
    font-size: clamp(2.125rem, 4vw, 3.5rem);
    letter-spacing: -0.045em;
    line-height: 1.08;
  }

  p {
    margin: 0;
    color: #cbd9ed;
    font-size: 1.125rem;
  }

  form {
    flex: 1 1 24rem;
    max-width: 34rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: 0.625rem;
    background: var(--surface-default);
    color: var(--brand-primary);

    > div {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    > small {
      margin: 0.75rem 0 0;
      color: var(--text-muted);
      font-size: 0.75rem;
      letter-spacing: 0;
      text-transform: none;
    }
  }

  label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 800;
  }

  input {
    min-width: 12rem;
    min-height: 3.625rem;
    flex: 1 1 17rem;
    padding-inline: 1rem;
    border: 1px solid #8fa7ba;
    border-radius: 0.375rem;
    background-color: var(--audit-url-input-background);
    color: var(--text-default);
    font: inherit;
  }

  button {
    min-height: 3.625rem;
    flex: 1 1 auto;
    padding-inline: 1.375rem;
    border: 0;
    border-radius: 0.375rem;
    background: var(--highlight-primary);
    color: var(--brand-primary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
}

#console-image-dialog {
  width: fit-content;
  max-width: 96vw;
  max-height: 96vh;
  padding: 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.75rem;
  background: var(--surface-default);
  box-shadow: 0 1.5rem 5rem rgba(7, 27, 74, 0.28);

  &::backdrop {
    background: rgba(3, 25, 77, 0.82);
  }

  form {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
  }

  form button {
    width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--brand-primary);
    border-radius: 50%;
    background: var(--highlight-primary);
    color: var(--brand-primary);
    font: inherit;
    font-weight: 700;
    box-shadow: 0 0.35rem 1rem rgba(7, 27, 74, 0.2);
    cursor: pointer;

    .material-symbols-outlined {
      font-size: 1.5rem;
      font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
    }

    &:focus-visible {
      outline: 0.1875rem solid var(--accent-primary);
      outline-offset: 0.15rem;
    }
  }

  > img {
    display: block;
    width: auto;
    max-width: calc(96vw - 2rem);
    max-height: calc(96vh - 5rem);
    object-fit: contain;
  }
}

::view-transition-group(console-screenshot) {
  animation-duration: 260ms;
  animation-timing-function: ease-in-out;
}

::view-transition-image-pair(console-screenshot) {
  isolation: isolate;
  mix-blend-mode: normal;
}

::view-transition-old(console-screenshot) {
  animation: none;
  opacity: 0;
}

::view-transition-new(console-screenshot) {
  animation: none;
  opacity: 1;
}

html[data-console-transition='closing']::view-transition-old(console-screenshot) {
  opacity: 1;
}

html[data-console-transition='closing']::view-transition-new(console-screenshot) {
  opacity: 0;
}

#results {
  main > section:first-child {
    min-height: calc(100vh - 11rem);
    display: block;
    padding-block: clamp(3.5rem, 8vw, 6.5rem);

    > header {
      max-width: 58rem;
      margin-bottom: 2.5rem;

      p {
        margin: 0;
        color: var(--text-muted);
        font-size: 1.125rem;
        overflow-wrap: anywhere;
      }
    }
  }

  h1 {
    max-width: 58rem;
    font-size: clamp(2.75rem, 6vw, 4.75rem);
  }

  article {
    max-width: 58rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--surface-border);
    border-radius: 0.75rem;
    background: var(--surface-default);
    box-shadow: 0 1rem 3rem rgba(7, 27, 74, 0.08);

    h2 {
      margin-bottom: 0.625rem;
      color: var(--brand-primary);
      font-size: clamp(1rem, 3vw, 1.5rem);
      line-height: 1.25;
    }

    > p {
      margin-bottom: 0;
      color: var(--text-muted);
    }

    > ul {
      display: flex;
      flex-direction: column;
      gap: 0;
      margin: 2rem 0 0;
      padding: 0;
      list-style: none;

      li {
        display: flex;
        align-items: flex-start;
        gap: 0.875rem;
        padding-block: 0.875rem;
        border-top: 1px solid var(--surface-border);

        > div {
          min-width: 0;
          flex: 1;
        }

        > span {
          width: 1.75rem;
          height: 1.75rem;
          flex: 0 0 1.75rem;
          display: grid;
          place-items: center;
          font-size: 1.25rem;
          font-weight: 900;
          line-height: 1;
        }

        &[data-status="pass"] > span {
          color: #16834b;
        }

        &[data-status="warn"] > span,
        &[data-status="fail"] > span {
          color: #c52828;
        }

        &.result-group-title {
          display: block;
          padding: 1.5rem 0 0.375rem;
          border-top: 0;

          h3 {
            margin: 0;
            color: var(--brand-primary);
            font-size: 0.8125rem;
            letter-spacing: 0.1em;
            line-height: 1.2;
            text-transform: uppercase;
          }
        }
      }

      p {
        margin: 0;
        color: var(--text-default);
      }

      dl {
        display: grid;
        grid-template-columns: max-content 1fr;
        gap: 0.375rem 1rem;
        margin: 0.75rem 0 0;
        color: var(--text-muted);
      }

      dt {
        color: var(--brand-primary);
        font-weight: 800;
      }

      dd {
        margin: 0;
      }
    }

    > a {
      display: inline-flex;
      min-height: 3rem;
      align-items: center;
      justify-content: center;
      margin-top: 2rem;
      padding-inline: 1.375rem;
      border-radius: 0.375rem;
      background: var(--brand-primary);
      color: var(--surface-default);
      font-weight: 700;
    }
  }
}
