/* ============================================================
   Navigation (nav#menu) — always visible at top, dark bar
   ============================================================ */
nav#menu { font-size: 14px; }
nav#menu a.nav-link { color: #81c3fc; }
nav#menu a.nav-link:hover { color: #d9edf7; text-decoration: none; }
a[href], button:not(:disabled), select:not(:disabled), summary, label[for],
label:has(input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)),
input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled) { cursor: pointer; }

/* ============================================================
   Site title
   ============================================================ */
div#title {
  background-color: #eee;
  border-bottom: 1px solid #ccc;
  text-align: center;
}
div#title h1 {
  font-family: "Poppins", Georgia, serif;
  font-size: 2.4rem;
  font-variant: normal;
  padding-top: 0.3rem;
  margin-bottom: 0;
}
div#title h1 a { display: inline-block; color: black; text-decoration: none; }
div#title h1 .t-red { font-variant: small-caps; }
div#title .site-title-suffix { font-size: 90%; }
div#title h1 a:hover { text-decoration: underline; text-decoration-color: #c0392b; color: black; }
.site-beta { font: 600 0.75rem system-ui, sans-serif; vertical-align: middle; }
div#title p#slogan { font-style: italic; font-size: 0.9rem; margin-bottom: 0.5rem; color: #444; }
.t-red   { color: #c0392b; }
.t-green { color: #27ae60; }

/* ============================================================
   Fieldsets used for search forms and family sections
   ============================================================ */
fieldset {
  min-width: 0;
  display: flow-root;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  background: #fff;
}
fieldset + fieldset { margin-top: 0.5rem; }
fieldset legend {
  float: left;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 0.5rem;
  padding: 0 0 0.375rem;
  border-bottom: 1px solid #dee2e6;
}
fieldset > :not(legend) { clear: both; padding-inline-start: .5rem; }
fieldset legend .btn-group { flex-shrink: 0; }
.fieldset-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.fieldset-toggle::before { content: "▾"; }
.fieldset-toggle[aria-expanded="false"]::before { content: "▸"; }
.fieldset-toggle:focus-visible { outline: 2px solid #0d6efd; outline-offset: 3px; }
fieldset.is-collapsed legend { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.card { --bs-card-border-color: #dee2e6; --bs-card-border-radius: 0.375rem; }
.card .table, fieldset .table { --bs-table-bg: transparent; }
.katex a { color: var(--bs-link-color); text-decoration: underline; }
.katex a:hover { color: var(--bs-link-hover-color); }

/* ============================================================
   Search form: compact number inputs and mode toggle rows
   ============================================================ */
.compact-number { width: 5ch; min-width: 2rem; }
.compact-number.chern-number { width: 7ch; }
.field-row { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.field-row label { margin-bottom: 0; }
.search-mode { display: none; }
.search-mode.active { display: block; }
.interval-invalid { background: #f8d7da !important; border-radius: 0.35rem; padding: 0.15rem 0.4rem; }
.interval-invalid input,
.interval-invalid span,
.interval-invalid label { background: #f8d7da; }

/* ============================================================
   Compact vertical spacing for Hodge diamonds and polyvector
   parallelograms.
   ============================================================ */
.hodge-diamond td, .pv-table td { padding-top: 0.2rem !important; padding-bottom: 0.2rem !important; }

/* ============================================================
   Three-column "label = value" tables (search overview +
   fourfold numerical invariants): fixed-width centre column
   ensures the "=" sign is always visually centred.
   ============================================================ */
.eq-table { table-layout: fixed; }
.eq-table td:nth-child(1) { text-align: right; }
.eq-table td:nth-child(2) {
  width: 2rem;
  text-align: center;
  white-space: nowrap;
}
.eq-table td:nth-child(3) { text-align: left; }
.statistics-table { table-layout: auto; width: auto; max-width: 100%; margin-inline: auto; }
.statistics-table td:last-child { white-space: nowrap; }

/* Non-intrusive copy-to-clipboard button (e.g. the ZL62 label). */
.copy-btn { background: none; border: none; padding: 0 0.15rem; cursor: pointer;
  color: #adb5bd; vertical-align: baseline; line-height: 1; }
.copy-btn:hover { color: #495057; }
.copy-btn.copied { color: #27ae60; }

/* Previous/next fourfold navigation. */
.fourfold-nav a { text-decoration: none; color: #6c757d; font-variant-numeric: tabular-nums; }
.fourfold-nav a:hover { color: #212529; }

th[data-sort] { cursor: pointer; }
th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; color: #6c757d; }
th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; color: #6c757d; }

.card-body { min-width: 0; }
.math-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: .4rem; }
.spectrum-plot { display: block; width: 100%; max-width: 550px; margin: auto; }
.spectrum-point { fill: #c6473a; }
.spectrum-point.is-hovered, .spectrum-point.is-focused, .spectrum-highlight { fill: #6bb6e4; stroke: #164d6d; stroke-width: 1.25; }
.eigenvalue-table tr.is-hovered > td, .eigenvalue-table tr.is-focused > td { background-color: #f0f3f5; }
.container .small, .container small, .container .h5, .container .h6,
.container h6, .container fieldset legend, .container .btn-sm,
.container .form-control-sm, .container .form-select-sm, .container code { font-size: 1rem; }
.container .katex { font-size: 1.08em; }
.defining-data { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: .75rem; }
.defining-data > dt { text-align: right; font-weight: 600; }
.defining-data > dd { min-width: 0; }
.presentation-list { display: block; padding-left: 1.25rem; }
.presentation-list a { display: inline-block; padding: 0; line-height: 1.35; }
.presentation-list a[aria-current] { color: #212529; font-weight: 600; text-decoration: none; }
.presentation-list > li + li { margin-top: .2rem; }
.presentation-geometry .math-scroll { padding-bottom: .2rem; }
.ambient-line-bundles .katex-display { margin: .25em 0; }
.ambient-line-bundles .katex-display > .katex { text-align: left; }
.family-section .defining-data > dd { margin-bottom: .35rem; }
.series-expansion { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: .25rem 0; }
.series-expansion:not(:disabled), .series-expansion:not(:disabled) * { cursor: pointer; }
.series-expansion:hover, .series-expansion:focus-visible { background: #f1f5fa; }
.series-expansion:disabled, .series-expansion:disabled * { cursor: default; }
.hilbert-identities { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); align-items: baseline; column-gap: .35em; row-gap: .25rem; }
.family-page p { margin-bottom: .5rem; }
.family-page .card-body { padding: .65rem .85rem; }
.family-page h3, .family-page h4, .family-page h5 { margin-bottom: .35rem; }
.family-page .eq-table strong { font-weight: 600; }
.family-geometry { display: grid; gap: .5rem; align-items: start; margin-bottom: .5rem; }
.family-geometry > fieldset + fieldset { margin-top: 0; }
@media (min-width: 992px) {
  .family-geometry.has-birational-web { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.presentation-list span { overflow-wrap: anywhere; }
#quantum-spectrum, #quantum-differential-equation { scroll-margin-top: 3rem; }
.katex-display { margin: .4em 0; }
.site-content { max-width: 1200px; }
.search-text, [hidden] { display: none !important; }
.pv-table td:first-child { vertical-align: middle; }
.database-table { font-variant-numeric: tabular-nums; }
.database-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  transform: translateY(var(--table-header-offset, 0px));
}
.database-table thead th { background: #f8f9fa; box-shadow: inset 0 -1px #dee2e6; white-space: nowrap; }
.database-table .family-cell, .database-table thead th:first-child { text-align: right; white-space: nowrap; }
.database-table .family-cell, .database-table .family-cell a { font-weight: 400; }
.database-table .description-cell { width: 26rem; min-width: 26rem; }
.database-table .description-cell p { margin-bottom: 0; }
.period-table th, .period-table td { white-space: nowrap; }
@media print { .database-table thead { position: static; transform: none; } }
.dynkin { max-width: 100%; overflow: visible; }
.dynkin-edges { stroke: #212529; stroke-width: 1; fill: none; }
.dynkin-labels { fill: #6c757d; font-size: 10px; font-style: italic; }
.dynkin-subscript { font-size: 7px; font-style: normal; }

.quantum-expression .katex-display { width: max-content; min-width: 100%; }
.qde-expression .katex-display > .katex { white-space: nowrap; text-align: left; }
.geometry-description p { margin-bottom: .4rem; }
.geometry-description h3 { font-size: 1rem; margin: .6rem 0 .3rem; }
.geometry-description .math.inline { overflow-wrap: anywhere; }
