.ids {
  & a {
    color: rgb(var(--ids__text-RGB));
    text-decoration: underline;
    will-change: color;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.1em;
    text-decoration-skip-ink: auto;
    text-decoration-color: rgba(var(--ids__text-RGB), 1);
    transition:
      color 0.2s ease,
      text-decoration 0.2s ease;

    &:hover {
      color: #007CCE;
      text-decoration-color: #007CCE;
      transition:
        color 0s ease,
        text-decoration 0s ease;
    }
  }

  .ids__promo-link {
    display: flex;

    & a {
      display: inline-block;
      padding: 0.45em 0.6em 0.5em;
      border: 1px solid rgba(var(--ids__text-RGB), 0.5);
      border-right: 0;

      &:hover {
        background-color: rgba(var(--ids__hover-RGB), 0.1)
      }

      &:first-child {
        border-radius: 0.3em 0 0 0.3em;
        padding-left: 1em;
      }

      &:last-child {
        border-radius: 0 0.3em 0.3em 0;
        padding-right: 1em;
        border-right: 1px solid rgba(var(--ids__text-RGB), 0.5)
      }

      &.active {
        color: RGB(var(--ids__text-RGB));
        background-color: rgba(var(--ids__text-RGB), 0.05);
        -webkit-text-decoration: none;
        text-decoration: none;
        cursor: default;
      }

      &.active::after {
        content: " ↓";
      }
    }
  }

  & p {
    margin-top: 0;
    font-size: 0.9em;
    margin-bottom: calc(var(--ids__density) * 0.4em);

    &.loud {
      font-size: 2em;
      line-height: 1.2;
    }

    &.huge {
      font-size: 6em;
      line-height: 1;
      -webkit-text-stroke: 1px rgba(var(--ids__text-RGB), 1);
      -webkit-text-fill-color: transparent;

      @media (max-width: 767px) {
        &.huge {
          font-size: 3.2em;
        }
      }

      @media (max-width: 549.98px) {
        &.huge {
          font-size: 2.8em;
        }
      }
    }
  }

  & h1,
  & h2,
  & h3,
  & h4,
  & h5,
  & h6 {
    margin: 0;
    font-weight: 600;
  }

  & h1 {
    font-size: 3.5em;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: calc(var(--ids__density) / 1.3);
    margin-bottom: 0.2em;

    @media (width < 767px) {
      font-size: 2.6em;
    }

    &.S {
      font-size: 2.4em;
      font-weight: 650;
    }

    &.XS {
      font-size: 1.5em;
      font-weight: 600;
    }
  }

  & h2 {
    font-size: 1.8em;
    font-weight: 400;
    line-height: calc(var(--ids__density) / 1.2);
    margin-bottom: 0.5em;

    &.XS {
      font-size: 1.5em;
      font-weight: 600;
    }
  }

  & h3 {
    font-size: 1.5em;
    line-height: calc(var(--ids__density) / 1.1);
    margin-bottom: 0.6em;
  }

  & h4 {
    font-size: 1.1em;
    line-height: var(--ids__density);
    margin-bottom: 0.5em;
  }

  & h5 {
    font-size: 1em;
    line-height: var(--ids__density);
    margin-bottom: 0.5em;
  }

  & h6 {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: var(--ids__density);
    margin-bottom: 0.5em;
  }

  & strong,
  & b {
    font-weight: 600;
  }

  & mark {
    color: rgb(var(--ids__text-RGB));
    background-color: rgb(var(--ids__mark-RGB));
  }

  & ul,
  & ol {
    margin: 0 0 calc(var(--ids__density) * 0.75em) 0;
    padding: 0;

    & li {
      position: relative;
      margin-bottom: calc(var(--ids__density) * 0.5em);
    }
  }

  & ul {
    & li {
      list-style-type: none;
      padding-left: calc(var(--ids__density) * 0.75em);

      &:before {
        position: absolute;
        left: 0;
        content: "⋅ ";
      }
    }
  }

  & ol {
    & li {
      list-style: decimal inside none;
    }
  }

  & blockquote {
    font-size: 1.4em;
    line-height: var(--ids__density);
    margin: 0;
    padding-left: calc(var(--ids__density) * 0.75em);
    margin-bottom: calc(var(--ids__density) * 1em);
  }

  & aside {
    margin: 0;
    margin-bottom: calc(var(--ids__density) * 0.5em);
    background: rgb(var(--ids__surface-RGB));
    padding-top: calc(var(--ids__density) * 0.4em);
    padding-right: calc(var(--ids__density) * 1.5em);
    padding-bottom: calc(var(--ids__density) * 0.4em);
    padding-left: calc(var(--ids__density) * 0.5em);
    border-radius: 0.2em;

    @media (width < 767px) {
      padding-right: calc(var(--ids__density) * 0.75em);
    }
  }

  & code {
    font-size: 0.9em;
    font-family: 'Golos Text', sans-serif;
    letter-spacing: 0.02em;
    font-weight: 450;
    padding: 0.1em 0.25em;
    border-radius: 0.2em;
    color: rgba(var(--ids__code-RGB), 1);
    border: 1px solid rgba(var(--ids__code-RGB), 0.1);
    background: rgba(var(--ids__code-RGB), 0.1);
  }

  & figure {
    margin: 0 0 calc(var(--ids__density) * 0.5em) 0;

    &.XXS,
    &.ids__figure__XXS {
      width: 25%;
    }

    &.XS,
    &.ids__figure__XS {
      width: 50%;
    }

    &.S,
    &.ids__figure__S {
      width: 75%;
    }

    & figcaption {
      margin-top: calc(var(--ids__density) * 0.25em);
      font-size: 0.8em;
      line-height: var(--ids__density);
      opacity: 0.7;
    }
  }

  & details {
    padding: 0.5em;
    cursor: pointer;
    border-radius: var(--ids__radius);

    & summary {
      padding-bottom: var(--ids__micro-padding);
    }
  }

  & table {
    border-spacing: 0;
    background-color: inherit;

    @media (max-width: 768px) {
      font-size: 0.7em;
    }

    thead {
      background-color: inherit;
    }

    tr {
      background-color: inherit;

      & th {
        position: sticky;
        top: 0px;
        text-align: left;
        border-bottom: 2px solid rgba(var(--ids__text-RGB), 1);
        padding-bottom: 0.3em;
        background-color: inherit;

        @media (max-width: 768px) {
          padding-top: 0.8em;
        }
      }

      & td {
        padding: 0.8em 0.5em 1em 0;
        border-bottom: 1px solid rgba(var(--ids__text-RGB), 0.5);
        vertical-align: top;
      }

      &:last-child {
        & td {
          border-bottom: none;
        }
      }
    }
  }

  & hr {
    border-top-color: rgba(var(--ids__text-RGB), 0.2);
    border-bottom: 0;
  }

  /* Media Utilities */
  .ids__media-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Text Utilities */
  .ids__text-constrained {
    max-width: 800px;
  }

  .ids__text-meta {
    font-size: 0.95em;
    margin-top: 1.5em;
    opacity: 0.8;
  }
}