/* ==========================================================================
   Brane Tilings and Two Interior Point Polygons — the explorer.
   Loaded after site.css and uses its variables (--brand-primary, --rule, ...).
   ========================================================================== */

/* the face numbers of the brane tilings are set in DejaVu Sans, matplotlib's
   default face, as in the summary; only the digits are bundled */
@font-face {
    font-family: "BT DejaVu Sans";
    src: url("fonts/DejaVuSans-digits.woff") format("woff");
    font-display: swap;
}

.bt-app {
    --bt-hot: rgba(66, 109, 140, 0.22);
    --bt-hot-strong: rgba(66, 109, 140, 0.36);
    --bt-quad: rgba(255, 210, 74, 0.30);
    --bt-land: rgba(119, 221, 85, 0.40);
    /* the perfect matching chosen in the matrices or in the toric diagram: a
       brighter blue than the site's, which marks what the pointer is on */
    --bt-pm: #1565c0;
    --bt-pm-soft: rgba(21, 101, 192, 0.12);
    --bt-pm-head: #d3e2f6;
    /* the loop of a generator's product of chiral fields in the quiver: a darker grass green */
    --bt-gen: #3b7d23;
    --bt-gen-soft: rgba(59, 125, 35, 0.12);
    --bt-col: rgba(66, 109, 140, 0.08);
    /* a chiral field chosen in the superpotential (or by its row of P): orange */
    --bt-field: #ef6c00;
    --bt-field-soft: rgba(239, 108, 0, 0.14);
    color: var(--ink-soft);
}

.bt-note {
    font-size: 0.88rem;
    color: var(--ink-muted);
}

.bt-error {
    color: #9b2c2c;
    font-weight: 600;
}

/* ------------------------------------------------------------- search -- */
.bt-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bt-search__input {
    flex: 1 1 24rem;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.bt-search__input:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
    border-color: var(--brand-primary);
}

/* ------------------------------------------------------------ crumbs -- */
.bt-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin: 0.25rem 0 1.25rem;
}

.bt-crumbs__sep {
    color: var(--ink-faint);
}

/* -------------------------------------------- all toric diagrams (home) -- */
.bt-group + .bt-group {
    margin-top: 2.5rem;
}

.bt-group__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.9rem;
    font-size: 1.35rem;
    margin: 0 0 1rem;
}

.bt-group__meta {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.bt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.9rem;
}

.bt-card,
.bt-pcard {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bt-card {
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.6rem 0.85rem;
}

.bt-card:hover,
.bt-pcard:hover,
.bt-card:focus-visible,
.bt-pcard:focus-visible {
    text-decoration: none;
    border-color: var(--brand-primary);
    box-shadow: 0 6px 18px rgba(21, 36, 46, 0.08);
    transform: translateY(-1px);
}

.bt-card__fig {
    width: 100%;
    max-width: 128px;
}

.bt-thumb {
    display: block;
    width: 100%;
    height: auto;
}

.bt-card__num {
    margin-top: 0.4rem;
    /* "Model N" under the toric diagram in Computer Modern Sans, regular, as in the summary's figures */
    font-family: KaTeX_SansSerif, "CMU Sans Serif", "Latin Modern Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--brand-primary);
}

.bt-card__name {
    color: var(--brand-primary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.bt-card__meta {
    font-size: 0.8rem;
    color: var(--ink-muted);
}

/* ------------------------------------------------------- search results -- */
.bt-results-head p {
    color: var(--ink);
}

.bt-result {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1.25rem;
}

.bt-result__head {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.9rem;
}

.bt-result__fig {
    flex: 0 0 92px;
    width: 92px;
}

.bt-result__title {
    font-size: 1.15rem;
    margin: 0 0 0.2rem;
}

.bt-result__title a {
    color: var(--ink);
}

.bt-result .bt-note {
    margin: 0;
}

/* ------------------------------------------------------------- phases -- */
.bt-pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 0.9rem;
}

.bt-pcard {
    padding: 0.6rem 0.6rem 0.75rem;
}

.bt-pcard__fig {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.bt-pcard__fig svg {
    display: block;
    width: 100%;
    height: 100%;
}

.bt-pcard__title {
    margin-top: 0.45rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.bt-pcard__meta {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ink-muted);
}

/* -------------------------------------------------------- one model -- */
.bt-model {
    display: grid;
    grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* the paper's figure of a model with several toric phases: the toric diagram and, beside it, the table of
   the multiplicities of its interior points in every toric phase */
.bt-model--table {
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
}

.bt-model--wide {
    grid-template-columns: minmax(0, 720px) minmax(0, 1fr);
}

.bt-geomrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.25rem;
}

.bt-geomrow .bt-geom {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 330px;
}

.bt-mult-wrap {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex: none;
}

/* as the paper sets it: rules between the columns, a double rule under the heading */
.bt-mult {
    border-collapse: collapse;
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.bt-mult th,
.bt-mult td {
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
    padding: 0.08rem 0.55rem;
    font-weight: 400;
}

.bt-mult thead tr:first-child th {
    border-top: 1px solid var(--ink);
}

.bt-mult thead tr:first-child th[colspan] {
    border-bottom: 1px solid var(--ink);
}

.bt-mult thead tr:last-child th,
.bt-mult thead tr:first-child th[rowspan] {
    border-bottom: 3px double var(--ink);
}

.bt-mult tbody tr:last-child td {
    border-bottom: 1px solid var(--ink);
}

.bt-mult th[scope="col"] .katex {
    font-size: 1em;
}

.bt-model figure,
.bt-figure {
    margin: 0;
}

.bt-geom {
    display: block;
    width: 100%;
    height: auto;
}

.bt-model figcaption,
.bt-figure__cap {
    font-size: 0.88rem;
    color: var(--ink-soft);
    text-align: center;
    margin-top: 0.5rem;
}

.bt-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.bt-subtitle {
    font-size: 1.2rem;
    margin: 2rem 0 1rem;
}

.bt-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem 1.25rem;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}

.bt-facts dt {
    font-weight: 600;
    color: var(--ink);
}

.bt-facts dd {
    margin: 0;
}

/* --------------------------------------------------------- one phase -- */
.bt-phase-head {
    margin-bottom: 1rem;
}

.bt-phase-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.bt-phase-nav__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.bt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.bt-chip {
    min-width: 2.2rem;
    padding: 0.12rem 0.5rem;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.85rem;
    text-align: center;
}

.bt-chip:hover {
    border-color: var(--brand-primary);
    text-decoration: none;
}

.bt-chip.is-current {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.bt-phase-nav__step {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.bt-arrival {
    background: #eef7ea;
    border: 1px solid #bfe0b1;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: var(--ink);
}

.bt-figure {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 1.25rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.bt-panel {
    text-align: center;
}

.bt-panel svg {
    display: block;
    width: 100%;
    height: auto;
}

.bt-panel__tag {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.bt-figure__cap {
    grid-column: 1 / -1;
    margin-top: 0;
}

.bt-status {
    min-height: 2.8em;
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* the brane tiling: faces are the click targets */
.bt-tiling {
    touch-action: manipulation;
}

.bt-face {
    fill: transparent;
    pointer-events: all;
    transition: fill 0.12s ease;
}

.bt-tiling:hover .bt-face.is-dual {
    fill: var(--bt-quad);
}

.bt-face.is-dual {
    cursor: pointer;
}

.bt-face.is-landed {
    fill: var(--bt-land);
}

.bt-face.is-hot,
.bt-tiling:hover .bt-face.is-hot {
    fill: var(--bt-hot);
}

.bt-face.is-dual.is-hot,
.bt-tiling:hover .bt-face.is-dual.is-hot {
    fill: var(--bt-hot-strong);
}

/* a click on a face whose Seiberg dual is the toric phase itself */
.bt-notice {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.75rem;
    background: #eef7ea;
    border: 1px solid #bfe0b1;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--ink);
    text-align: left;
}

.bt-notice[hidden] {
    display: none;
}

/* a row of its own under the brane tiling: showing it does not move (a) and (b) */
.bt-figure > .bt-notice {
    grid-column: 3;
    margin-top: -0.75rem;
}

/* the line under the brane tiling has a row of its own too: however long it
   grows, (a) and (b) stay where they are, so a point can be clicked again */
.bt-figure > .bt-status {
    grid-column: 3;
    margin-top: -0.9rem;
    text-align: center;
}

/* "↑ Figure" brings the figure up below the site's navigation bar */
.bt-figure {
    scroll-margin-top: calc(var(--nav-h, 92px) + 0.5rem);
}

.bt-notice.is-flash {
    animation: bt-notice-flash 0.7s ease-out;
}

@keyframes bt-notice-flash {
    from { background: #cfeac2; }
    to { background: #eef7ea; }
}

@media (prefers-reduced-motion: reduce) {
    .bt-notice.is-flash {
        animation: none;
    }
}

.bt-edge.is-hot {
    stroke: var(--brand-primary);
    stroke-width: 0.03;
}

.bt-qnode {
    transition: fill 0.12s ease;
}

.bt-qnode.is-hot {
    fill: #9cc3df;
}

/* the superpotential */
.bt-section {
    margin-bottom: 1.25rem;
}

.bt-section > p {
    color: var(--ink);
}

/* beside the JSON download of a phase: that its file is being prepared, or could
   not be loaded.  Empty, it takes no room in the row (it would wrap onto a line of
   its own at some widths) but stays a live region, so its words are announced. */
.bt-download__note {
    align-self: center;
    color: #9b2c2c;
    font-size: 0.88rem;
}

.bt-download__note.is-busy {
    color: var(--ink-muted);
}

.bt-download__note:empty {
    position: absolute;
}

.bt-W-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.bt-W {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
}

.bt-W__grid {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: center;
    column-gap: 0.35em;
    row-gap: 0.35em;
    font-size: 1.05rem;
    color: var(--ink);
}

.bt-W__line {
    white-space: nowrap;
}

.bt-W__sign {
    margin: 0 0.25em;
}

.bt-field,
.bt-fref {
    border-radius: 3px;
    padding: 0 0.08em;
    transition: background 0.12s ease;
}

.bt-field:hover,
.bt-field.is-hot,
.bt-fref.is-hot {
    background: var(--bt-hot);
}

.bt-eqno {
    flex: 0 0 auto;
    color: var(--ink-soft);
}

.bt-sentence {
    color: var(--ink);
    margin: 0;
}

/* ------------------------------------------------------ duality tree -- */
.bt-tree-box {
    margin: 0.5rem 0 1.5rem;
}

.bt-tree-panel {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.bt-tree-scroll {
    overflow-x: auto;
}

.bt-tree {
    display: block;
    margin: 0 auto;
    max-width: none;
}

/* the lines, arrowheads and squares carry the pens of the paper's tree figures as attributes (red lines on a
   white casing, an arrowhead at both ends, white squares framed in black); the styles add only what the page
   needs: the pointer and the marks of hover, focus and the current phase */
.bt-tree__line:hover .bt-tree__edge,
.bt-tree__line:hover .bt-tree__loop {
    stroke-width: 4;
}

.bt-tree__node {
    cursor: pointer;
}

.bt-tree__node rect {
    fill: #fff;
    stroke: #000;
    transition: fill 0.12s ease;
}

.bt-tree__node text {
    /* bold Computer Modern Sans, as in the paper's tree figures (\sffamily\bfseries) */
    font-family: KaTeX_SansSerif, "CMU Sans Serif", "Latin Modern Sans", sans-serif;
    font-weight: 700;
    fill: #000;
}

.bt-tree__node:hover rect,
.bt-tree__node:focus rect {
    fill: #ffe3db;
}

.bt-tree__node:focus {
    outline: none;
}

.bt-tree__node.is-current rect {
    fill: #ffcbbd;
}

/* ------------------------------------------------- perfect matchings -- */
/* a perfect matching in the figures: its edges in the brane tiling, its
   arrows in the quiver, its point in the toric diagram */
.bt-edge.is-pm {
    stroke: var(--bt-pm);
    stroke-width: 0.034;
}

.bt-edge.is-pm.is-hot {
    stroke: var(--brand-primary);
    stroke-width: 0.042;
}

.bt-qline.is-pm,
.bt-qhead.is-pm {
    stroke: var(--bt-pm);
}

/* ------------------------------------------------------ chiral fields -- */
/* a chiral field chosen in the superpotential: its edge in the brane tiling, its arrow in the quiver, its two places
   in W and its row of P, in orange (as a perfect matching in blue) */
.bt-edge.is-field {
    stroke: var(--bt-field);
    stroke-width: 0.042;
}

.bt-qline.is-field,
.bt-qhead.is-field {
    stroke: var(--bt-field);
}

.bt-W .bt-field {
    cursor: pointer;
}

.bt-W .bt-field:focus-visible {
    outline: 2px solid var(--bt-field);
    outline-offset: 1px;
}

.bt-field.is-field,
.bt-field.is-field:hover {
    background: var(--bt-field-soft);
    color: var(--bt-field);
    box-shadow: inset 0 -2px 0 var(--bt-field);
}

.bt-mat__field {
    cursor: pointer;
}

.bt-mat__table .bt-mat__field:hover {
    background-color: #e6ecf0;             /* var(--bt-col) on the table's tint, opaque: the column is sticky */
}

.bt-mat__table .bt-mat__field:focus-visible {
    outline: 2px solid var(--bt-field);
    outline-offset: -2px;
}

.bt-mat__table tbody .is-field {
    background-color: var(--bt-field-soft);
}

.bt-mat__table tbody th.is-field {
    background-color: #f3e4d6;             /* var(--bt-field-soft) on the table's tint, opaque: the column is sticky */
}

.bt-mat__table tbody th.is-field,
.bt-mat__table td.is-field:not(.is-zero) {
    color: var(--bt-field);
    font-weight: 700;
}

/* ------------------------------------------------------- generators -- */
/* a product of chiral fields chosen in the table of generators: its loop in the quiver */
.bt-qline.is-gen,
.bt-qhead.is-gen {
    stroke: var(--bt-gen);
}

.bt-gens__scroll {
    overflow-x: auto;
}

.bt-gens__table {
    border-collapse: collapse;
    margin: 0.4rem 0 0.6rem;
    color: var(--ink);
}

.bt-gens__table th,
.bt-gens__table td {
    border: 1px solid var(--rule);
    padding: 0.3rem 0.6rem;
    text-align: left;
    vertical-align: middle;
}

.bt-gens__table thead th {
    background: var(--surface-tint);
    font-weight: 600;
    font-size: 0.9rem;
}

.bt-gens__a,
.bt-gens__pm {
    white-space: nowrap;
}

.bt-gens__table .bt-gens__a {
    font-weight: normal;
}

.bt-gens__cf {
    line-height: 2.1;
}

/* the mesonic flavour charges of the generators, where the paper's table gives them (the paper on reflexive polygons) */
.bt-gens__table .bt-gens__q {
    text-align: center;
    white-space: nowrap;
}

/* the paper's names for products of perfect matchings, under the table */
.bt-gens__note {
    margin: 0 0 0.6rem;
}

.bt-gens__eq {
    margin: 0 0.15rem;
}

.bt-gprod {
    font: inherit;
    color: inherit;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.05rem 0.3rem;
    cursor: pointer;
    white-space: nowrap;
}

.bt-gprod:hover {
    background: var(--bt-gen-soft);
    border-color: rgba(59, 125, 35, 0.35);
}

.bt-gprod:focus-visible {
    outline: 2px solid var(--bt-gen);
    outline-offset: 1px;
}

.bt-gprod[aria-pressed="true"] {
    background: var(--bt-gen-soft);
    border-color: var(--bt-gen);
    color: var(--bt-gen);
}

.bt-gens__status {
    min-height: 2.6em;
    margin: 0 0 0.75rem;
    padding: 0.45rem 0.75rem;
    background: var(--surface-tint);
    border-left: 3px solid var(--rule-strong);
    font-size: 0.9rem;
}

.bt-gens__status.is-on {
    border-left-color: var(--bt-gen);
    color: var(--ink);
}

.bt-dock__figs.bt-dock__figs--one {
    grid-template-columns: minmax(0, 1fr);
}

/* the dock of a generator's loop holds the quiver alone: as high as the perfect matchings' dock, not twice */
.bt-dock.bt-dock--gen {
    width: min(24rem, calc(100vw - 2rem));
}

.bt-tpt,
.bt-tlabel,
.bt-toric rect {
    cursor: pointer;
}

.bt-tpt:focus {
    outline: none;
}

.bt-tpt:hover {
    stroke: var(--brand-primary);
}

.bt-tpt:focus-visible {
    stroke: var(--brand-primary) !important;
    stroke-width: 0.1 !important;
}

.bt-tpt.is-pm {
    stroke: var(--bt-pm);
}

.bt-tlabel.is-pm {
    fill: var(--bt-pm);
}

.bt-pms {
    margin-top: 1.75rem;
}

.bt-pms__head {
    font-size: 1.2rem;
    margin: 0 0 0.75rem;
}

.bt-pms > p {
    color: var(--ink);
}

.bt-pms__status {
    min-height: 3.9em;
    margin: 0 0 0.75rem;
    padding: 0.45rem 0.75rem;
    background: var(--surface-tint);
    border-left: 3px solid var(--rule-strong);
    font-size: 0.9rem;
}

.bt-pms__status.is-on {
    border-left-color: var(--bt-pm);
}

/* "P =", the matrix, its equation number: the boxes of P, Q_F and Q_D start
   at the same place, so their columns line up */
.bt-mrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.1rem;
}

.bt-mrow__sym {
    flex: 0 0 3.6rem;
    text-align: right;
    color: var(--ink);
}

.bt-mrow .bt-eqno {
    min-width: 4.2rem;
    margin-left: auto;
    text-align: right;
}

.bt-mat__scroll {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    overflow: auto;
    max-height: 27rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
    scroll-padding-left: 5.2rem;
    scroll-padding-top: 2rem;
}

.bt-mat__scroll:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
}

/* every matrix has the same column widths, so the four scroll together and a
   perfect matching is one column all the way down */
.bt-mat__table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.bt-mat__c0 {
    width: 5.2rem;
}

.bt-mat__c {
    width: 2.55rem;
}

.bt-mat__table th,
.bt-mat__table td {
    padding: 0.16rem 0.15rem;
    text-align: center;
    white-space: nowrap;
    line-height: 1.35;
}

.bt-mat__table td {
    cursor: pointer;
}

.bt-mat__table td.is-zero {
    color: var(--ink-faint);
}

/* the summary's rules: after the corners, and wherever the point changes */
.bt-mat__table .is-cut {
    border-left: 1px solid var(--rule-strong);
}

/* the names of the perfect matchings: the header row stays in view */
.bt-mat__table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-tint);
    border-bottom: 1px solid var(--rule);
    font-weight: 400;
}

/* the names of the rows: the first column stays in view */
.bt-mat__table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface-tint);
    border-right: 1px solid var(--rule);
    text-align: right;
    padding-right: 0.5rem;
    font-weight: 400;
}

.bt-mat__table thead .bt-mat__corner {
    left: 0;
    z-index: 3;
    border-right: 1px solid var(--rule);
}

.bt-mat__pm {
    display: inline-block;
    min-width: 100%;
    padding: 0.05rem 0.1rem;
    border: 0;
    border-radius: 3px;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.bt-mat__pm:hover {
    background: var(--bt-hot);
}

.bt-mat__pm:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: -1px;
}

.bt-mat__table .is-col {
    background-color: var(--bt-col);
}

.bt-mat__table thead th.is-col {
    background-color: #e6edf2;
}

.bt-mat__table td.is-pm {
    background-color: var(--bt-pm-soft);
}

.bt-mat__table td.is-pm:not(.is-zero) {
    color: var(--bt-pm);
    font-weight: 700;
}

.bt-mat__table thead th.is-pm {
    background-color: var(--bt-pm-head);
}

.bt-mat__table thead th.is-pm .bt-mat__pm {
    color: var(--bt-pm);
}

/* the quiver and the brane tiling again, small, while the figure is scrolled away */
/* the small window at the lower right: twice as wide and twice as high since the user's request of 2026-11-23
   ("make small right bottom corner previou window larger (double height and length)"); its figures scale with it */
.bt-dock {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    width: min(46rem, calc(100vw - 2rem));
    max-height: calc(100vh - var(--nav-h, 92px) - 2rem);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(11, 46, 63, 0.18);
    padding: 0.5rem 0.6rem 0.6rem;
}

.bt-dock[hidden] {
    display: none;
}

.bt-dock__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.bt-dock__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-dock__btn {
    flex: 0 0 auto;
    padding: 0.1rem 0.45rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.bt-dock__btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.bt-dock__figs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 0.5rem;
    align-items: center;
}

.bt-dock__figs svg {
    display: block;
    width: 100%;
    height: auto;
    /* never taller than the window (the dock of a generator's loop holds the quiver alone, as wide as the dock) */
    max-height: calc(100vh - var(--nav-h, 92px) - 6rem);
}

@media (max-width: 1099.98px) {
    .bt-dock {
        display: none;
    }
}

@media print {
    .bt-dock {
        display: none;
    }
    .bt-mat__scroll {
        max-height: none;
        overflow: visible;
    }
}

/* ------------------------------------------------------------ narrow -- */
@media (max-width: 991.98px) {
    .bt-figure {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .bt-panel--b,
    .bt-figure > .bt-status,
    .bt-figure > .bt-notice {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
        max-width: 560px;
    }
}

@media (max-width: 767.98px) {
    .bt-model {
        grid-template-columns: minmax(0, 1fr);
    }
    .bt-phase-nav__step {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .bt-figure {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.9rem;
    }
    .bt-W-row {
        padding: 0.75rem;
    }
    .bt-result__head {
        align-items: flex-start;
    }
    /* "P =" and the equation number on one line, the matrix on the next at full width */
    .bt-mrow {
        flex-wrap: wrap;
        gap: 0.25rem 0.75rem;
    }
    .bt-mrow__sym {
        flex: 0 0 auto;
        text-align: left;
    }
    .bt-mrow .bt-mat__scroll {
        order: 2;
        flex: 1 1 100%;
    }
}

/* the full stop after the superpotential, as in the summary */
.bt-W__end {
    margin-left: 0.2em;
}

/* ---------------------------------------------------------- the paper -- */
/* The reference right below the title and the tiles of the papers (the user, 2026-11-23: it replaces the white
   section of the paper, background and all): the paper's title; on every page its authors, as the site's publications
   page writes them (the group's author set off as there, by .pub__authors em), and its arXiv number; its abstract on
   the first page only; and the buttons. */
.bt-ref em {
    font-style: normal;
    font-weight: 600;
    color: #fff;
}

/* the arXiv number and its category stay together on one line */
.bt-ref__arxiv {
    white-space: nowrap;
}

.bt-ref + .callout__text {
    margin-top: 0.9rem;
}

/* The site's callout sets the buttons beside the text from 768px up; beside a whole abstract that squeezes the text
   into a narrow column, so here they go under it until the screen is wide enough for both. */
@media (max-width: 1199.98px) {
    #cite .callout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* the breadcrumbs and, on the right, the button for the citation of the paper (on every view) */
.bt-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.bt-bar .bt-crumbs {
    margin: 0;
}

/* -------------------------------------------------- the hero: the papers -- */
/* Right below the title "Brane Tilings", one tile for each paper of the database, leading to its page; the tile of
   the page itself is solid (aria-current="page"). */
.bt-papers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
    max-width: 58rem;
    margin: 1.75rem 0 0;
}

.bt-paper-tile {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.05rem 1.25rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    color: #fff;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bt-paper-tile:hover,
.bt-paper-tile:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}

.bt-paper-tile:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.bt-paper-tile.is-current,
.bt-paper-tile.is-current:hover,
.bt-paper-tile.is-current:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--brand-secondary);
}

.bt-paper-tile__meta {
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    opacity: 0.75;
}

.bt-paper-tile__title {
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.3;
}

.bt-paper-tile__authors {
    font-size: 0.9rem;
    opacity: 0.85;
}

.bt-paper-tile__count {
    margin-top: auto;
    padding-top: 0.3rem;
    font-size: 0.84rem;
    opacity: 0.7;
}

/* the notes on the paper's text of a phase (the paper on reflexive polygons), in the facts list */
.bt-notes p {
    margin: 0 0 0.35rem;
    max-width: 52rem;
}

.bt-notes p:last-child {
    margin-bottom: 0;
}
