:root {
  --docs-space-small: 0.4rem;
  --docs-space-medium: 0.8rem;
  --docs-space-large: 1.6rem;
  --docs-reading-width: 75ch;
}

.md-grid {
  max-width: 72rem;
}

.md-typeset > p,
.md-typeset > ul,
.md-typeset > ol,
.md-typeset > blockquote {
  max-width: var(--docs-reading-width);
}

.md-typeset h1 {
  margin-bottom: var(--docs-space-large);
  text-wrap: balance;
}

.md-typeset h2 {
  margin-top: var(--docs-space-large);
  margin-bottom: var(--docs-space-medium);
}

.md-typeset .scenario-index ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--docs-space-medium) var(--docs-space-large);
  padding: 0;
  margin: var(--docs-space-medium) 0;
  list-style: none;
}

.md-typeset .scenario-index li {
  margin: 0;
}

.scenario-index a {
  display: block;
  padding-block: var(--docs-space-small);
  font-weight: 700;
}

.md-typeset .table-scroll-hint {
  margin-bottom: var(--docs-space-small);
  color: var(--md-default-fg-color--light);
  font-size: 0.7rem;
}

.md-typeset .doc-table-scroll {
  margin-top: 0;
  scrollbar-color: var(--md-default-fg-color--light) var(--md-default-bg-color);
}

.doc-table-scroll:focus-visible,
.chart-full-size:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 2px;
}

.md-typeset .matrix-scroll {
  max-height: 70vh;
  overflow: auto;
  isolation: isolate;
}

.md-typeset .matrix-scroll .md-typeset__table {
  display: block;
  padding: 0;
}

.md-typeset .matrix-scroll table:not([class]) {
  display: table;
  width: 100%;
  min-width: 75rem;
  max-width: none;
  margin: 0;
  overflow: visible;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.matrix-scroll th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--md-default-bg-color);
}

.matrix-scroll th:first-child,
.matrix-scroll td:first-child {
  position: sticky;
  left: 0;
  min-width: 7rem;
  max-width: 9rem;
  background: var(--md-default-bg-color);
  box-shadow: 1px 0 0 var(--md-default-fg-color--lightest);
}

.matrix-scroll td:first-child {
  z-index: 1;
}

.matrix-scroll th:first-child {
  z-index: 3;
}

.table-field-label {
  display: none;
}

.chart-full-size {
  display: inline-block;
  padding-block: var(--docs-space-small);
}

@media (max-width: 44.99em) {
  .md-typeset .scenario-index ul {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--docs-space-small);
  }

  .md-typeset .recommendation-scroll,
  .md-typeset .recommendation-scroll .md-typeset__table {
    display: block;
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }

  .md-typeset .recommendation-scroll table:not([class]) {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.8rem;
  }

  .recommendation-scroll thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .recommendation-scroll tbody,
  .recommendation-scroll tr,
  .md-typeset .recommendation-scroll table:not([class]) td {
    display: block;
  }

  .recommendation-scroll tbody tr {
    padding-block: var(--docs-space-medium);
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
  }

  .md-typeset .recommendation-scroll table:not([class]) td {
    padding: var(--docs-space-small) 0;
    border: 0;
    min-width: 0;
  }

  .recommendation-scroll td:first-child {
    font-weight: 700;
  }

  .recommendation-scroll .table-field-label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--md-default-fg-color--light);
    font-size: 0.65rem;
    font-weight: 700;
  }
}

@media print {
  .md-typeset .matrix-scroll {
    max-height: none;
    overflow: visible;
  }

  .matrix-scroll th,
  .matrix-scroll td:first-child {
    position: static;
  }

  .md-typeset .matrix-scroll table:not([class]) {
    min-width: 0;
  }

  .table-scroll-hint,
  .chart-full-size {
    display: none;
  }
}
