.root {
  --layout-inline-content-max-width: var(--two-column-inline-content-max-width, 500px);
  --layout-inline-lg-content-max-width: var(--two-column-inline-lg-content-max-width, 700px);
  --layout-inline-xl-content-max-width: var(--two-column-inline-xl-content-max-width, 1200px);
}

.group {
  padding-left: var(--content-margin);
  padding-right: var(--content-margin);
  margin-left: auto;
  margin-right: auto;
  max-width: var(--section-max-width, none);
}

.group-full {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
  width: 100%;
}

.box {
  max-width: var(--content-max-width);
}

.inline {
  --content-max-width: var(--layout-inline-content-max-width);
}

.inline.width-lg {
  --content-max-width: var(--layout-inline-lg-content-max-width);
}

.inline.width-xl {
  --content-max-width: var(--layout-inline-xl-content-max-width);
}

.inline.width-full {
  --content-max-width: unset;
}

.restrict-xxs,
.restrict-xs,
.restrict-sm {
  margin: 0 auto;
}

.align-left {
  margin-left: 0;
}

.align-right {
  margin-right: 0;
}

.restrict-xxs {
  width: 30%;
}

.restrict-xs {
  width: 50%;
}

.restrict-sm {
  width: 70%;
}

.customMargin {
  /*
    We want to undo the group padding by applying a negative margin to
    the box.

    Percentage margin and max-width of the box are calculated relative
    to the inner width and height of the group, which does not include
    the padding of the group. We apply a factor to express the group
    width in terms of box width. Note that

          box-width = group-width - 2 * group-width * content-margin-factor
      <=> group-width = box-width / (1 - 2 * content-margin-factor)
  */
  --f: calc(1 / (1 - 2 * var(--content-margin-fraction)));
  --margin-to-undo: var(--theme-content-margin,
                        calc(100% * var(--content-margin-fraction) * var(--f)));
  margin-left: calc(-1 * var(--margin-to-undo));
  margin-right: calc(-1 * var(--margin-to-undo));
  max-width: calc(var(--margin-to-undo) * 2 + var(--content-max-width));
}

.right .inline {
  margin-left: auto;
}

.side {
  --content-width: var(--theme-two-column-sticky-content-width, 25vw);
  --content-max-width: min(var(--content-width), var(--two-column-sticky-content-max-width, 600px));
  float: right;
  clear: both;
  top: 33%;
  width: var(--content-width);
}

.sticky {
  composes: side;
  position: sticky;
}

.right .side {
  float: left;
}

.side.width-lg {
  --content-width: var(--theme-two-column-sticky-lg-content-width, 35vw);
  --content-max-width: min(var(--content-width),
                           var(--two-column-sticky-lg-content-max-width, 700px));
}

.side.width-xl {
  --content-width: var(--theme-two-column-sticky-xl-content-width, 45vw);
  --content-max-width: min(var(--content-width),
                           var(--two-column-sticky-xl-content-max-width, 1000px));
}

.side.customMargin {
  width: 100%;
}
