.doc {
  --rem-base: 16;
}

.doc .paragraph.lead > p {
  font-size: calc(18 / var(--rem-base) * 1rem);
}

.doc .right {
  float: right;
}

.doc .left {
  float: left;
}

.doc .float-gap.right {
  margin: 0 1rem 1rem 0;
}

.doc .float-gap.left {
  margin: 0 0 1rem 1rem;
}

.doc .float-group::after {
  content: "";
  display: table;
  clear: both;
}

.doc .text-left {
  text-align: left;
}

.doc .text-center {
  text-align: center;
}

.doc .text-right {
  text-align: right;
}

.doc .text-justify {
  text-align: justify;
}

.doc .stretch {
  width: 100%;
}

.doc .big {
  font-size: larger;
}

.doc .small {
  font-size: smaller;
}

.doc .underline {
  text-decoration: underline;
}

.doc .line-through {
  text-decoration: line-through;
}

.doc > table.tableblock,
.doc > table.tableblock + *,
.doc .tablecontainer,
.doc .tablecontainer + *,
.doc :not(.tablecontainer) > table.tableblock,
.doc :not(.tablecontainer) > table.tableblock + * {
  margin-top: 1.5rem;
}

.doc table.tableblock {
  font-size: calc(15 / var(--rem-base) * 1rem);
}

.doc p.tableblock + p.tableblock {
  margin-top: 0.5rem;
}

.doc table.tableblock pre {
  font-size: inherit;
}

.doc td.tableblock > .content {
  word-wrap: anywhere; /* aka overflow-wrap; used when hyphens are disabled or aren't sufficient */
}

.doc td.tableblock > .content > :first-child {
  margin-top: 0;
}

.doc table.tableblock th,
.doc table.tableblock td {
  padding: 0.5rem;
}

.doc table.tableblock,
.doc table.tableblock > * > tr > * {
  border: 0 solid var(--table-border-color);
}

.doc table.grid-all > * > tr > * {
  border-width: 1px;
}

.doc table.grid-cols > * > tr > * {
  border-width: 0 1px;
}

.doc table.grid-rows > * > tr > * {
  border-width: 1px 0;
}

.doc table.grid-all > thead th,
.doc table.grid-rows > thead th {
  border-bottom-width: 2.5px;
}

.doc table.frame-all {
  border-width: 1px;
}

.doc table.frame-ends {
  border-width: 1px 0;
}

.doc table.frame-sides {
  border-width: 0 1px;
}

.doc table.frame-none > colgroup + * > :first-child > *,
.doc table.frame-sides > colgroup + * > :first-child > * {
  border-top-width: 0;
}

/* NOTE let the grid win in case of frame-none */

.doc table.frame-sides > :last-child > :last-child > * {
  border-bottom-width: 0;
}

.doc table.frame-none > * > tr > :first-child,
.doc table.frame-ends > * > tr > :first-child {
  border-left-width: 0;
}

.doc table.frame-none > * > tr > :last-child,
.doc table.frame-ends > * > tr > :last-child {
  border-right-width: 0;
}

.doc table.stripes-all > tbody > tr,
.doc table.stripes-odd > tbody > tr:nth-of-type(odd),
.doc table.stripes-even > tbody > tr:nth-of-type(even),
.doc table.stripes-hover > tbody > tr:hover {
  background: var(--table-stripe-background);
}

.doc table.tableblock > tfoot {
  background: var(--table-footer-background);
}

.doc .halign-left {
  text-align: left;
}

.doc .halign-right {
  text-align: right;
}

.doc .halign-center {
  text-align: center;
}

.doc .valign-top {
  vertical-align: top;
}

.doc .valign-bottom {
  vertical-align: bottom;
}

.doc .valign-middle {
  vertical-align: middle;
}

.doc .image:not(.left):not(.right) > img {
  margin-top: -0.2em;
}

#preamble .abstract blockquote {
  background: var(--abstract-background);
  border-left: 5px solid var(--abstract-border-color);
  color: var(--abstract-font-color);
  font-size: calc(16 / var(--rem-base) * 1rem);
  padding: 0.75em 1em;
}

.doc .quoteblock,
.doc .verseblock {
  background: var(--quote-background);
  border-left: 5px solid var(--quote-border-color);
  color: var(--quote-font-color);
}

.doc .quoteblock {
  padding: 0.25rem 2rem 1.25rem;
}

.doc .quoteblock .attribution {
  color: var(--quote-attribution-font-color);
  font-size: calc(15 / var(--rem-base) * 1rem);
  margin-top: 0.75rem;
}

.doc .quoteblock blockquote {
  margin-top: 1rem;
}

.doc .quoteblock .paragraph {
  font-style: italic;
}

.doc .quoteblock cite {
  padding-left: 1em;
}

.doc .verseblock {
  font-size: 1.15em;
  padding: 1rem 2rem;
}

.doc .verseblock pre {
  font-family: inherit;
  font-size: inherit;
}

.doc ol,
.doc ul {
  /* padding: 0 0 0 1rem; */
}

.doc ul.checklist,
.doc ul.none,
.doc ol.none,
.doc ul.no-bullet,
.doc ol.unnumbered,
.doc ul.unstyled,
.doc ol.unstyled {
  list-style-type: none;
}

.doc ul.no-bullet,
.doc ol.unnumbered {
  padding-left: 1.25rem;
}

.doc ul.unstyled,
.doc ol.unstyled {
  padding-left: 0;
}

.doc ul.circle {
  list-style-type: circle;
}

.doc ul.disc {
  list-style-type: disc;
}

.doc ul.square {
  list-style-type: square;
}

.doc ul.circle ul:not([class]),
.doc ul.disc ul:not([class]),
.doc ul.square ul:not([class]) {
  list-style: inherit;
}

.doc ol.arabic {
  list-style-type: decimal;
}

.doc ol.decimal {
  list-style-type: decimal-leading-zero;
}

.doc ol.loweralpha {
  list-style-type: lower-alpha;
}

.doc ol.upperalpha {
  list-style-type: upper-alpha;
}

.doc ol.lowerroman {
  list-style-type: lower-roman;
}

.doc ol.upperroman {
  list-style-type: upper-roman;
}

.doc ol.lowergreek {
  list-style-type: lower-greek;
}

.doc ul.checklist {
  padding-left: 1.75rem;
}

.doc ul.checklist p > i.fa-check-square-o:first-child,
.doc ul.checklist p > i.fa-square-o:first-child {
  display: inline-flex;
  justify-content: center;
  width: 1.25rem;
  margin-left: -1.25rem;
}

.doc ul.checklist i.fa-check-square-o::before {
  content: "\2713";
}

.doc ul.checklist i.fa-square-o::before {
  content: "\274f";
}

.doc .ulist .listingblock,
.doc .olist .listingblock,
.doc .admonitionblock .listingblock {
  padding: 0;
}

.doc table.tableblock caption {
  text-align: left;
}

.doc .olist .title,
.doc .ulist .title {
  font-style: var(--caption-font-style);
  font-weight: var(--caption-font-weight);
  margin-bottom: 0.25rem;
}

.doc .imageblock .title,
.doc .videoblock .title {
  margin-top: 0.5rem;
  padding-bottom: 0;
}

/*
.doc details > summary::after {
  content: "";
  width: 1rem;
  height: 1em;
  position: absolute;
  top: calc((var(--doc-line-height) * 0.5 - 0.5) * 1em);
  left: -1rem;
}

.doc details.result {
  margin-top: 0.25rem;
}

.doc details.result > summary {
  color: var(--caption-font-color);
  font-style: italic;
  margin-bottom: 0;
}

.doc details.result > .content {
  margin-left: -1rem;
}

.doc .exampleblock > .content,
.doc details.result > .content {
  background: var(--example-background);
  border: 0.25rem solid var(--example-border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.doc .exampleblock > .content::after,
.doc details.result > .content::after {
  content: "";
  display: table;
  clear: both;
}

.doc .exampleblock > .content > :first-child,
.doc details > .content > :first-child {
  margin-top: 0;
} */

.doc .sidebarblock {
  background: var(--sidebar-background);
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
}

.doc .sidebarblock > .content > .title {
  font-size: calc(22.5 / var(--rem-base) * 1rem);
  font-weight: var(--alt-heading-font-weight);
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-align: center;
}

.doc .sidebarblock > .content > .title + *,
.doc .sidebarblock > .content > :not(.title):first-child {
  margin-top: 0;
}

/* NEEDS REVIEW prevent pre in table from causing article to exceed bounds */

.doc table.tableblock pre,
.doc .listingblock.wrap pre {
  white-space: pre-wrap;
}

.doc .language-console .hljs-meta {
  user-select: none;
}

.doc td.hdlist1,
.doc td.hdlist2 {
  padding: 0.5rem 0 0;
  vertical-align: top;
}

.doc tr:first-child > .hdlist1,
.doc tr:first-child > .hdlist2 {
  padding-top: 0;
}

.doc td.hdlist1 {
  font-weight: var(--body-font-weight-bold);
  padding-right: 0.25rem;
}

.doc td.hdlist2 {
  padding-left: 0.25rem;
}

.doc .colist {
  font-size: calc(16 / var(--rem-base) * 1rem);
  margin: 0.25rem 0 -0.25rem;
}

.doc .colist > table > tr > :first-child,
.doc .colist > table > tbody > tr > :first-child {
  padding: 0.25em 0.5rem 0;
  vertical-align: top;
}

.doc .colist > table > tr > :last-child,
.doc .colist > table > tbody > tr > :last-child {
  padding: 0.25rem 0;
}

.doc .conum[data-value] {
  border: 1px solid currentColor;
  border-radius: 100%;
  display: inline-block;
  font-family: var(--body-font-family);
  font-size: calc(13.5 / var(--rem-base) * 1rem);
  font-style: normal;
  line-height: 1.2;
  text-align: center;
  width: 1.25em;
  height: 1.25em;
  letter-spacing: -0.25ex;
  text-indent: -0.25ex;
}

.doc .conum[data-value]::after {
  content: attr(data-value);
}

.doc .conum[data-value] + b {
  display: none;
}

.doc b.button {
  white-space: nowrap; /* effectively ignores hyphens setting */
}

.doc b.button::before {
  content: "[";
  padding-right: 0.25em;
}

.doc b.button::after {
  content: "]";
  padding-left: 0.25em;
}

.doc kbd {
  display: inline-block;
  font-size: calc(12 / var(--rem-base) * 1rem);
  background: var(--kbd-background);
  border: 1px solid var(--kbd-border-color);
  border-radius: 0.25em;
  box-shadow: 0 1px 0 var(--kbd-border-color), 0 0 0 0.1em var(--body-background) inset;
  padding: 0.25em 0.5em;
  vertical-align: text-bottom;
  white-space: nowrap; /* effectively ignores hyphens setting */
}

.doc kbd,
.doc .keyseq {
  line-height: 1;
}

.doc .keyseq {
  font-size: calc(16 / var(--rem-base) * 1rem);
}

.doc .keyseq kbd {
  margin: 0 0.125em;
}

.doc .keyseq kbd:first-child {
  margin-left: 0;
}

.doc .keyseq kbd:last-child {
  margin-right: 0;
}

.doc .menuseq,
.doc .path {
  hyphens: none;
}

.doc .menuseq i.caret::before {
  content: "\203a";
  font-size: 1.1em;
  font-weight: var(--body-font-weight-bold);
  line-height: calc(1 / 1.1);
}

.doc :not(pre).nowrap {
  white-space: nowrap;
}

.doc .nobreak {
  hyphens: none;
  word-wrap: normal;
}

.doc :not(pre).pre-wrap {
  white-space: pre-wrap;
}
