/* MathData's own styles. Loads after mathpages/mathpages.css (shared colours, header, tabs,
   footer, controls). Only MathData's page components live here, using those tokens. */
:root {
  --mp-product: #c4638f;          /* pink: middle stripe of the MathData mark */
  --dt-planned: #8a4a68;
  --dt-planned-bg: #f8edf2;
}
html[data-theme="dark"] {
  --mp-product: #e49abb;
  --dt-planned: #f1bfd5;
  --dt-planned-bg: #3a2731;
}

.dt-main { padding-block: 28px 56px; }
.dt-heading { max-width: 62rem; margin-bottom: 24px; }
.dt-heading h1 { margin: 0 0 8px; }
.dt-eyebrow { margin: 0 0 6px; color: var(--mp-muted); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.dt-lede { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
.dt-crumbs { margin: 0 0 10px; font-size: .875rem; }

.dt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 18px; margin: 0 0 32px; padding: 0; list-style: none; }
.dt-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--mp-border); border-top: 3px solid var(--mp-product);
  border-radius: var(--mp-radius-lg); background: var(--mp-surface); }
.dt-card h2, .dt-card h3 { margin: 0; font-size: 1.2rem; }
.dt-card h2 a, .dt-card h3 a { color: var(--mp-ink); text-decoration: none; }
.dt-card h2 a:hover, .dt-card h3 a:hover { color: var(--mp-link); text-decoration: underline; }
.dt-card p { margin: 0; color: var(--mp-muted); font-size: .9375rem; line-height: 1.55; }
.dt-card ul { margin: 0; padding-left: 1.1rem; font-size: .9375rem; }

.dt-status { display: inline-flex; align-self: flex-start; align-items: center; padding: 2px 10px; border-radius: var(--mp-radius-pill);
  background: var(--dt-planned-bg); color: var(--dt-planned); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }

.dt-prose { max-width: 62rem; }
.dt-prose h2 { margin: 32px 0 10px; }
.dt-prose h3 { margin: 24px 0 8px; }
.dt-prose p, .dt-prose li { line-height: 1.65; }
.dt-note { max-width: 62rem; margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid var(--mp-product); border-radius: var(--mp-radius-sm);
  background: var(--mp-surface-soft); font-size: .9375rem; }

.dt-table-wrap { max-width: 100%; margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); background: var(--mp-surface); }
.dt-table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.dt-table caption { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--mp-ink); }
.dt-table th, .dt-table td { padding: 8px 14px; border-top: 1px solid var(--mp-border); text-align: left; vertical-align: top; }
.dt-table thead th { background: var(--mp-surface-muted); font-size: .8125rem; font-weight: 700; }
.dt-table code, .dt-schema code { font-size: .875rem; }
.dt-schema td:first-child { white-space: nowrap; }

@media (max-width: 760px) {
  .dt-main { padding-block: 20px 40px; }
  .dt-table th, .dt-table td { padding: 7px 10px; }
}

/* Datasets with data */
.dt-status-data { background: var(--mp-product); color: var(--mp-surface); }
.dt-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; max-width: 62rem; margin: 0 0 20px; }
.dt-search label { font-weight: 600; }
.dt-search input { width: 9rem; padding: 7px 10px; border: 1px solid var(--mp-border-strong, var(--mp-border)); border-radius: var(--mp-radius-sm);
  background: var(--mp-surface); color: var(--mp-ink); font: inherit; font-variant-numeric: tabular-nums; }
.dt-type-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.dt-type-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius);
  background: var(--mp-surface); color: var(--mp-ink); text-decoration: none; }
.dt-type-list a:hover { border-color: var(--mp-product); }
.dt-type-name { font-size: 1.125rem; }
.dt-type-meta { color: var(--mp-muted); font-size: .8125rem; }
.dt-coords { display: inline-block; min-width: 7ch; margin-right: .5em; color: var(--mp-muted); font-family: var(--mp-font-mono, ui-monospace, monospace); font-size: .8125rem; }
.dt-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.dt-data td { padding-block: 5px; }
.dt-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; max-width: 62rem; margin: 0 0 14px; font-size: .9375rem; }
.dt-smaller { font-weight: 700; color: var(--mp-product); }
.dt-na { color: var(--mp-muted); }
.dt-table tfoot th, .dt-table tfoot td { border-top: 2px solid var(--mp-border); font-weight: 600; }
.dt-jordan td, .dt-jordan th[scope="row"] { white-space: nowrap; }
.dt-jordan th[scope="row"] { font-weight: 400; }
.dt-same { color: var(--mp-muted); }
.dt-variant { color: var(--mp-muted); font-size: .8125rem; }
/* Weyl module vs simple module in the Jordan block tables */
.dt-split-note { max-width: 62rem; margin: 28px 0 10px; }
.dt-split-note p { margin: 0; line-height: 1.6; }
.dt-split-col { background: var(--dt-planned-bg); }
.dt-table thead th.dt-split-col { background: var(--dt-planned-bg); color: var(--dt-planned); }
.dt-split-tag { font-size: .75rem; font-weight: 700; }
.dt-vl { display: block; white-space: nowrap; }
.dt-vl + .dt-vl { margin-top: 3px; padding-top: 3px; border-top: 1px dashed var(--mp-border); }
.dt-vl-tag { display: inline-block; min-width: 1.6em; color: var(--dt-planned); font-weight: 700; }
.dt-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Jordan blocks explorer */
.jb-js .jb-static { display: none; }
.jb-controls { display: grid; gap: 12px; max-width: 100%; margin: 10px 0 18px; padding: 14px 16px; border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius); background: var(--mp-surface); }
.jb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.jb-heading { font-weight: 700; }
.jb-row select { padding: 4px 8px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); background: var(--mp-surface); color: var(--mp-ink); font: inherit; }
.jb-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 12px; }
.jb-group { margin: 0; padding: 8px 12px 10px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); }
.jb-group legend { padding: 0 4px; font-weight: 700; }
.jb-check { display: inline-flex; align-items: center; gap: 5px; margin: 3px 12px 3px 0; }
.jb-group .jb-check { white-space: nowrap; }
.jb-controls { min-width: 0; }
.jb-group { min-width: 0; }
.jb-link { padding: 0 2px; border: 0; background: none; color: var(--mp-link); font: inherit; font-size: .8125rem; font-weight: 400; text-decoration: underline; cursor: pointer; }
.jb-table h3 { margin: 22px 0 6px; font-size: 1.125rem; }
.jb-note { max-width: 62rem; margin: 0 0 8px; line-height: 1.55; }
/* semisimple elements */
.dt-orders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 62rem; margin: 0 0 14px; font-weight: 600; }
.dt-orders a, .dt-order-current { display: inline-block; min-width: 2.2em; padding: 3px 8px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-pill); text-align: center; font-weight: 400; text-decoration: none; }
.dt-order-current { border-color: var(--mp-product); background: var(--mp-product); color: var(--mp-surface); font-weight: 700; }
.dt-kac { font-family: var(--mp-font-mono, ui-monospace, monospace); font-size: .8125rem; white-space: nowrap; }
.dt-ss td { white-space: nowrap; }
.dt-vl-tag-wide { min-width: 5.5em; font-size: .8125rem; }
.dt-filter { max-width: 62rem; margin: 0 0 14px; }
.dt-filter fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; padding: 10px 14px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); }
.dt-filter legend { padding: 0 4px; font-weight: 600; }
.dt-filter select, .dt-filter input { padding: 4px 8px; border: 1px solid var(--mp-border-strong, var(--mp-border)); border-radius: var(--mp-radius-sm); background: var(--mp-surface); color: var(--mp-ink); font: inherit; }
.dt-filter input { width: 6.5rem; }
.dt-filter button { padding: 5px 12px; border: 1px solid var(--mp-product); border-radius: var(--mp-radius-sm); background: var(--mp-product); color: var(--mp-surface); font: inherit; font-weight: 600; cursor: pointer; }
.dt-filter p { margin: 8px 0 0; }
.dt-hint { flex-basis: 100%; color: var(--mp-ink-muted, var(--mp-ink)); font-size: .8125rem; }
.dt-downloads { max-width: 62rem; margin: 0 0 16px; }
.dt-downloads p, .dt-downloads ul { margin: 0 0 4px; }
.dt-downloads ul { padding-left: 1.2em; }
.dt-powers { font-size: .8125rem; }
/* provenance and citation block */
.dt-about { max-width: 62rem; margin: 28px 0 8px; padding: 14px 18px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); }
.dt-about h2 { margin: 0 0 8px; font-size: 1.125rem; }
.dt-about dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.dt-about dt { font-weight: 600; }
.dt-about dd { margin: 0; }
.dt-cite { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) { .dt-about dl { grid-template-columns: 1fr; } .dt-about dd { margin-bottom: 6px; } }
/* the same type in the other datasets */
.dt-typenav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; max-width: 62rem; margin: 0 0 14px; font-size: .9375rem; }
.dt-typenav-label { font-weight: 600; }
.dt-typenav [aria-current="page"] { font-weight: 600; color: var(--mp-ink); }
.dt-xlink { margin-left: 6px; font-size: .8125rem; font-weight: 400; white-space: nowrap; }
/* long data tables: scroll inside the box, with the header row and the first column kept in view */
.dt-table-wrap:has(> .dt-data) { max-height: min(80vh, 60rem); overflow: auto; }
.dt-data thead th { position: sticky; top: 0; z-index: 2; }
.dt-data tbody tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--mp-surface); }
.dt-data thead th:first-child { left: 0; z-index: 3; }
.dt-data tbody tr:target th, .dt-data tbody tr:target td { background: var(--dt-planned-bg); }

/* finite groups of Lie type (prototype) */
.lt-lookup .lt-answer { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--mp-radius-sm); background: var(--mp-surface-soft); }
.lt-lookup .lt-answer p { margin: 0 0 4px; }
.lt-error { color: #b42318; }
.lt-intro { max-width: 62rem; }
.lt-guide th[scope="row"] { white-space: nowrap; }
.lt-src { color: var(--mp-ink-muted, var(--mp-muted)); font-size: .875rem; }
.lt-tag { display: inline-block; padding: 0 8px; border: 1px solid var(--mp-border-strong, var(--mp-border)); border-radius: var(--mp-radius-pill); font-size: .75rem; }
.lt-cases { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.lt-cases a, .lt-cases span { padding: 3px 10px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-pill); font-size: .875rem; text-decoration: none; }
.lt-cases span[aria-current] { border-color: var(--mp-product); background: var(--mp-product); color: var(--mp-surface); }
.lt-matrix { width: auto; }
.lt-matrix th, .lt-matrix td { padding: 4px 8px; border-bottom: 1px solid var(--mp-border); vertical-align: middle; }
.lt-matrix .lt-cell { min-width: 2.2em; text-align: center; font-variant-numeric: tabular-nums; }
.lt-matrix .lt-zero { color: var(--mp-muted); }
.lt-matrix .lt-param { background: color-mix(in srgb, var(--mp-product) 14%, transparent); font-weight: 600; }
.lt-matrix .lt-col { text-align: center; font-weight: 400; }
.lt-colnum { color: var(--mp-muted); font-size: .75rem; }
.lt-matrix .lt-rowhead { text-align: left; white-space: nowrap; }
.lt-matrix .lt-deg, .lt-matrix .lt-alias, .lt-matrix .lt-mult { white-space: nowrap; font-size: .875rem; }
.lt-matrix .lt-block { font-size: .8125rem; color: var(--mp-muted); white-space: nowrap; }
.lt-matrix tr.lt-newblock > * { border-top: 2px solid var(--mp-border-strong, var(--mp-ink)); }
.lt-matrix tr.lt-exc > * { background: var(--mp-surface-soft); }
.lt-degrees, .lt-params, .lt-notes, .lt-cite { max-width: 62rem; }
.lt-degrees li { margin: 2px 0; }
.lt-tree { margin: 8px 0 20px; overflow-x: auto; }
.lt-tree-canvas { position: relative; margin: 0 auto; }
.lt-tree-canvas > svg { position: absolute; inset: 0; overflow: visible; }
.lt-tree-canvas > svg line { stroke: var(--mp-ink); stroke-width: 1.5; }
.lt-tree-canvas > svg circle { fill: var(--mp-surface); stroke: var(--mp-ink); stroke-width: 1.5; }
.lt-tree-canvas > svg circle.lt-exc-v { fill: var(--mp-ink); }
.lt-tree-canvas > svg .lt-edge-num { fill: var(--mp-muted); font-size: 12px; }
.lt-vlabel { position: absolute; width: 0; height: 0; display: flex; justify-content: center; align-items: flex-start; white-space: nowrap; font-size: .875rem; line-height: 1.2; }
.lt-vlabel > span { display: block; flex: none; white-space: nowrap; }
.lt-tree figcaption { color: var(--mp-muted); font-size: .8125rem; text-align: center; }
.lt-ct { width: auto; font-size: .8125rem; }
.lt-ct td, .lt-ct th { white-space: nowrap; padding: 3px 8px; }
.lt-ct .lt-ct-meta td { color: var(--mp-ink-muted, var(--mp-muted)); }
.lt-matrix-wrap { display: inline-block; vertical-align: top; }
.lt-matrix tr.lt-absent > * { opacity: .45; }
.lt-guide th[scope="row"] { white-space: nowrap; font-weight: 400; }
.lt-vmult { font-size: .8125rem; color: var(--mp-ink-muted, var(--mp-muted)); }
/* label anchors: a zero-size box at the vertex, the label pushed out on one side */
.lt-vlabel.lt-at-below { justify-content: center; align-items: flex-start; } .lt-at-below > span { margin-top: 12px; }
.lt-vlabel.lt-at-above { justify-content: center; align-items: flex-end; } .lt-at-above > span { margin-bottom: 12px; }
.lt-vlabel.lt-at-right { justify-content: flex-start; align-items: center; } .lt-at-right > span { margin-left: 14px; }
.lt-vlabel.lt-at-left { justify-content: flex-end; align-items: center; } .lt-at-left > span { margin-right: 14px; }
.lt-vlabel.lt-at-below-right { justify-content: flex-start; align-items: flex-start; } .lt-at-below-right > span { margin: 8px 0 0 10px; }
.lt-vlabel.lt-at-below-left { justify-content: flex-end; align-items: flex-start; } .lt-at-below-left > span { margin: 8px 10px 0 0; }
.lt-vlabel.lt-at-above-right { justify-content: flex-start; align-items: flex-end; } .lt-at-above-right > span { margin: 0 0 8px 10px; }
.lt-vlabel.lt-at-above-left { justify-content: flex-end; align-items: flex-end; } .lt-at-above-left > span { margin: 0 10px 8px 0; }
/* MathJax 4 breaks long inline formulas at spaces; in these tables a formula stays on one line */
.lt-ct mjx-container, .lt-matrix mjx-container, .lt-unip mjx-container { white-space: nowrap !important; }
/* links whose text is mostly mathematics: an underline would stop short of the MathJax, so none at all */
.lt-guide a, .lt-cases a, .lt-lookup a, .dt-crumbs a:has(mjx-container) { text-decoration: none; }
.lt-guide a:hover, .lt-guide a:focus-visible { background: color-mix(in srgb, var(--mp-product) 10%, transparent); border-radius: var(--mp-radius-sm); }
.lt-guide tr.lt-missing th, .lt-guide tr.lt-missing td { color: var(--mp-ink-muted, var(--mp-muted)); }
.lt-params-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 4px 24px; padding-left: 1.2em; }
.lt-fn { color: var(--mp-product); margin-left: 2px; }
.lt-matrix td.dt-num, .lt-unip td.dt-num { white-space: nowrap; }
.lt-tree-canvas > svg .lt-kappa { fill: var(--mp-product); font-size: 12px; font-weight: 600; }
