:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #082b5c;
  --md-primary-fg-color--light: #174b86;
  --md-primary-fg-color--dark: #051b3a;
  --md-accent-fg-color: #0db7a3;
}

.md-typeset table:not([class]) {
  font-size: 0.72rem;
}

.md-typeset td code {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.md-typeset td {
  overflow-wrap: anywhere;
}

.md-typeset .anchor-jump-highlight,
.md-typeset .anchor-jump-highlight > td,
.md-typeset .anchor-jump-highlight > th {
  border-radius: 0.25rem;
  animation: anchor-jump-highlight 1.5s ease-out;
}

@keyframes anchor-jump-highlight {
  0%,
  28% {
    background-color: rgb(250 204 21 / 12%);
  }

  100% {
    background-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .anchor-jump-highlight,
  .md-typeset .anchor-jump-highlight > td,
  .md-typeset .anchor-jump-highlight > th {
    background-color: rgb(250 204 21 / 12%);
    animation: none;
  }
}

.comparison-table-wrap {
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  box-shadow: 0 10px 28px rgb(15 23 42 / 8%);
}

.md-typeset .product-comparison {
  display: table;
  width: 100%;
  min-width: 34rem;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.76rem;
}

.md-typeset .product-comparison th,
.md-typeset .product-comparison td {
  padding: 0.72rem 0.55rem;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.md-typeset .product-comparison thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-align: center;
}

.md-typeset .product-comparison thead th:first-child {
  width: 40%;
  text-align: left;
}

.md-typeset .product-comparison tbody th {
  color: #334155;
  font-weight: 600;
  text-align: left;
}

.md-typeset .product-comparison tbody td {
  text-align: center;
  white-space: nowrap;
}

.md-typeset .product-comparison .featured-product {
  background: #eef2ff;
  box-shadow: inset 1px 0 #c7d2fe, inset -1px 0 #c7d2fe;
}

.md-typeset .product-comparison thead .featured-product {
  background: #4f46e5;
  color: #fff;
  box-shadow: none;
}

.md-typeset .product-comparison tbody tr:last-child th,
.md-typeset .product-comparison tbody tr:last-child td {
  border-bottom: 0;
}

.md-typeset .product-comparison tbody tr:hover th,
.md-typeset .product-comparison tbody tr:hover td:not(.featured-product) {
  background: #f8fafc;
}

.product-comparison .score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.06em;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.product-comparison .score-5 {
  color: #15803d;
}

.product-comparison .score-4 {
  color: #65a30d;
}

.product-comparison .score-3 {
  color: #ca8a04;
}

.product-comparison .score-2 {
  color: #ea580c;
}

.product-comparison .score-1 {
  color: #dc2626;
}

.product-comparison .stars-empty {
  opacity: 0.28;
}

.report-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 7rem);
  min-height: 42rem;
  border: 0;
}

body:has(.report-frame) .md-sidebar--secondary {
  display: none;
}

body:has(.report-frame) .md-content {
  min-width: 0;
  max-width: none;
}

@media screen and (min-width: 76.25em) {
  body:has(.report-frame) .md-main__inner {
    max-width: none;
    margin-right: 0.6rem;
    margin-left: max(calc((100vw - 61rem) / 2), 0.6rem);
  }
}

/* Release information uses the same feed as the Python client. */
.release-current, .release-card {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .6rem;
  overflow-wrap: anywhere;
}
.release-current { background: var(--md-code-bg-color); }
.release-card h3 { margin-top: 0; }

/* Formula reference: compact catalogue and readable per-formula entries. */
body:has(#formula-reference) .md-typeset .formula-heading {
  padding-top: 1rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  font-family: var(--md-code-font-family);
  overflow-wrap: anywhere;
}
body:has(#formula-reference) .md-typeset table:not([class]) {
  display: table;
  width: 100%;
}
body:has(#formula-reference) .md-typeset td:first-child {
  min-width: 8rem;
}
body:has(#formula-reference) .md-sidebar--secondary .md-nav__link {
  overflow-wrap: anywhere;
}

/* Keep wide formula tables scrollable on mobile. */
@media screen and (max-width: 720px) {
  body:has(#formula-reference) .md-typeset table:not([class]) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Pipeline parameter reference: description with type and default metadata. */
.api-parameters table:not([class]) {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.api-parameters th:first-child,
.api-parameters td:first-child {
  width: 27%;
}
.api-parameters td {
  vertical-align: top;
}
.api-param-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.6rem 1rem;
  width: 100%;
  margin-top: 1rem;
}
.api-param-meta > span:last-child {
  justify-self: end;
  text-align: right;
}
.api-param-meta > span {
  min-width: 0;
  max-width: 100%;
}
.api-param-meta strong {
  font-size: 0.65rem;
  text-transform: uppercase;
}
@media screen and (max-width: 44.9375em) {
  .api-parameters .md-typeset__table,
  .api-parameters table:not([class]),
  .api-parameters tbody,
  .api-parameters tr,
  .api-parameters td {
    display: block;
    width: 100%;
  }
  .api-parameters thead {
    display: none;
  }
  .api-parameters tr + tr {
    border-top: 1px solid var(--md-default-fg-color--lightest);
  }
  .api-parameters td:first-child {
    width: 100%;
    padding-bottom: 0;
    font-weight: 700;
  }
  .api-parameters td:not(:first-child) {
    border-top: none !important;
  }
  .api-param-meta {
    grid-template-columns: minmax(0, 1fr);
  }
  .api-param-meta > span:last-child {
    justify-self: start;
    text-align: left;
  }
}
