/*
 * App additions to alignvu UI v2.1 (css/vendor/alignvu_ui_v2.css), for the shared components in
 * js/modules/shared/ui and the screens rebuilt with them. Uses the design-system tokens only.
 */

/* ---------- FeedTable additions ---------- */

/* A second line under a column heading (e.g. "Reconciled 14/11/2026") */
.app-th-meta {
    display: block;
    margin-top: 2px;
    font: 400 11.5px/14px var(--font-display);
    color: var(--muted);
    white-space: normal;
}

/* Count, share and a share bar in one cell */
.av-table td.app-sharecell {
    min-width: 140px;
}

/* Bar, count and share on one line. The bar takes a fixed share of the cell, so every bar in a column has the
   same length whatever the number of digits; the count and share follow it directly */
.app-sharecell__line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-sharecell .av-bar {
    flex: 0 0 50%;
    height: 6px;
}

.app-sharecell__line > span:not(.av-bar) {
    white-space: nowrap;
}

/* A non-zero figure always shows some colour, however small its share */
.app-sharecell .av-bar > span {
    min-width: 6px;
}

.app-sharecell__pct {
    font-size: 12px;
}

/* Row headings inside the body (outcome labels and totals), on white rather than the header band */
.av-table tbody th {
    background: var(--surface);
    font: 600 13px/18px var(--font-display);
    color: var(--heading-ink);
    text-align: left;
    vertical-align: top;
    padding: 9px var(--space-4);
    border-bottom: 1px solid var(--row-rule);
    white-space: normal;
}

/* A hovered row highlights its row heading too */
.av-table tbody tr:hover th {
    background: var(--fill);
}

/* ---------- Assess > Field Assess ---------- */

.app-fa-summary {
    margin: 8px 0 16px;
}

.app-fa-summary .app-fa-total td,
.app-fa-summary .app-fa-total th {
    border-bottom-color: var(--border);
}

/* Original and Cleaned read as one pair: no rule between them, and compact rows (28px) */
.app-fa-summary .app-fa-original td,
.app-fa-fields .app-fa-original td {
    border-bottom-color: transparent;
}

.app-fa-summary .app-fa-original td,
.app-fa-summary .app-fa-cleaned td,
.app-fa-fields .app-fa-original td,
.app-fa-fields .app-fa-cleaned td {
    height: 28px;
    padding-top: 3px;
    padding-bottom: 3px;
}

.av-table tbody th.app-fa-outcome {
    min-width: 150px;
    vertical-align: middle;
}

/* A figure that opens details: looks like the figure, behaves as a button */
.app-cellbutton {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
}

.app-cellbutton:hover > *,
.app-cellbutton:hover {
    color: var(--heading-ink);
    text-decoration: underline;
}

/* A heading or group row that folds what is under it */
.app-fa-toggle {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.app-fa-toggle .av-icon {
    transition: transform .15s;
}

.app-fa-toggle[aria-expanded="true"] .av-icon {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .app-fa-toggle .av-icon {
        transition: none;
    }
}

/* Screen header: the comparison panel, holding the comparison and its actions (Reference codes, Reset, Show both ways) */
.app-fa-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 8px;
}

.app-fa-compare {
    flex: 1 1 320px;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.app-fa-compare .header-details {
    min-width: 0;
}

.app-fa-compare__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.app-fa-compare .header-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* "Comparing" / "with", then each feed: product name, provider in grey, its codes as small tags
   (js/modules/assess/compare_header.js) */
.app-fa-compare__row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0;
}

.app-fa-compare__label {
    flex: none;
    width: 72px;
    font: 400 12px/20px var(--font-display);
    color: var(--muted);
}

.app-fa-compare__feeds {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.app-fa-compare__feed {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.app-fa-compare__name {
    font: 500 14px/20px var(--font-display);
    color: var(--heading-ink);
}

.app-fa-compare__provider {
    font: 400 13px/20px var(--font-display);
    color: var(--muted);
}

.app-fa-compare__codes {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.app-fa-compare__code {
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--surface);
    font: 500 11.5px/18px var(--font-display);
    color: var(--ink-grey);
    font-variant-numeric: tabular-nums;
}

.app-fa-excluded {
    color: var(--muted);
    text-decoration: line-through;
}

.app-fa-compare__code.app-fa-excluded {
    background: var(--fill);
}

.app-fa-compare__actions .ref-code-filter-container {
    align-items: center;
}

/* Cluster heading (SectionHeader) */
.app-fa-cluster {
    margin-top: 22px;
}

.app-fa-cluster__title {
    margin: 0;
    font: 700 17px/24px var(--font-display);
    color: var(--heading-ink);
}

/* Model-field breakdown: one block per field (its name, then its own table), with space between blocks. The area
   hangs from the cluster summary (no gap, the rule continues from its edge) on a light grey band so the field
   tables read as detail of the totals above */
.app-fa-fieldlist {
    margin: -16px 0 24px;
    padding: 4px 16px 20px;
    border-left: 2px solid var(--border);
    background: var(--day-band);
}

.app-fa-field,
.app-fa-subcluster {
    margin-top: 24px;
}

.app-fa-field__name,
.app-fa-subcluster__name {
    margin: 0 0 8px;
    font: 600 15px/22px var(--font-display);
    color: var(--heading-ink);
}

.app-fa-subcluster__fields {
    padding-left: 16px;
}

/* Field Assess native fields pop-up: wide enough for its six columns, never wider than the window */
#model-field-baseline-native-field-modal .modal-content {
    width: min(1100px, calc(100vw - 32px));
}

/* Native fields pop-up: names wrap at word boundaries; the count column has room for its share bar */
#model-field-baseline-native-field-modal .native-field-content td {
    overflow-wrap: anywhere;
}

#model-field-baseline-native-field-modal .native-field-content td.app-sharecell {
    min-width: 180px;
}

/* ---------- Dialog (pop-up) built from v2.1 parts inside the shared .modal-content ---------- */

.modal-content.app-dialog {
    background: var(--surface);
    gap: 16px;
}

.app-dialog__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-dialog__title,
.modal-content.app-dialog .app-dialog__title {
    margin: 0;
    font: 600 17px/24px var(--font-display);
    color: var(--heading-ink);
}

.app-dialog .modal-body {
    min-height: 0;
    overflow: auto;
}

.app-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Field crossover pop-up: sub-outcomes indented, alternative field names indented and in italics */
.app-xo tbody th {
    font-weight: 400;
    color: var(--table-ink);
    min-width: 220px;
}

.app-xo .app-xo-indent th {
    padding-left: calc(var(--space-4) + 20px);
}

.app-xo .app-xo-alternative th {
    font-style: italic;
}

.app-xo .app-xo-total th,
.app-xo .app-xo-total td {
    font-weight: 600;
    color: var(--heading-ink);
}

/* Fixed column shares, so the table always fits the pop-up (the bars take what the numbers leave) */
.app-xo {
    table-layout: fixed;
}

/* the cleaned column is wider by the gap in front of it, so both groups' bars are the same length */
.app-xo thead th:nth-child(1) { width: 25%; }
.app-xo thead th:nth-child(2) { width: 30%; }
.app-xo thead th:nth-child(3) { width: 6.5%; }
.app-xo thead th:nth-child(4) { width: 32%; }
.app-xo thead th:nth-child(5) { width: 6.5%; }

.app-xo thead th {
    white-space: normal;
    text-align: left;
}

.app-xo td.app-sharecell {
    padding-right: 0;
}

/* As the main tables: the bar takes the cell less an allowance; the count and share are right aligned in it */
.app-xo .app-sharecell__line {
    display: grid;
    grid-template-columns: calc(100% - 92px) 1fr 5.5ch;
    column-gap: 6px;
}

.app-xo .app-sharecell__line > span:not(.av-bar) {
    text-align: right;
}

/* Records columns: right aligned and just wide enough, so each sits next to its own values; the room between the
   original and cleaned groups is before the cleaned values */
.app-xo th:nth-child(3),
.app-xo td:nth-child(3),
.app-xo th:nth-child(5),
.app-xo td:nth-child(5) {
    text-align: right;
    padding-left: 10px;
    padding-right: 12px;
}

/* A rule between the original group (values, records) and the cleaned group */
.app-xo th:nth-child(4),
.app-xo td:nth-child(4) {
    padding-left: 32px;
    border-left: 1px solid var(--row-rule);
}

/* The svgs in these pop-ups only mark where CrossoverBar puts a figure; an empty one must take no space */
.app-xo svg[data-type],
#model-field-baseline-native-field-modal svg.nativeFieldTypeModalChart {
    display: none;
}

/* v2.1 tabs that keep the legacy "tab" class (scripts select it): only the v2.1 underline, no legacy one */
.av-tabs .av-tab.tab,
.av-tabs .av-tab.tab:hover,
.av-tabs .av-tab.tab.active {
    display: inline-block;
    margin: 0;
    text-decoration: none;
}

/* Field Assess main tables: fixed columns share the width equally, so every bar in a column is the same length.
   Below the minimum width the table scrolls inside its frame. */
.app-fa-summary .av-table,
.app-fa-fields .av-table {
    table-layout: fixed;
    min-width: 1040px;
}

.app-fa-summary thead th:nth-child(1),
.app-fa-fields thead th:nth-child(1) {
    width: 150px;
}

.app-fa-summary thead th:nth-child(2),
.app-fa-fields thead th:nth-child(2) {
    width: 76px;
}

.app-assess-table td.app-sharecell {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

/* The bar takes the cell less a fixed allowance for the count and share (so it is the same length in every row);
   the count and share are right aligned in that allowance */
.app-assess-table .app-sharecell__line {
    display: grid;
    grid-template-columns: calc(100% - 102px) 1fr 5ch;
    column-gap: 6px;
}

.app-assess-table .app-sharecell__line > span:not(.av-bar) {
    text-align: right;
}

.app-assess-table .app-sharecell__pct {
    font-size: 11.5px;
}

/* Field Assess main tables: a light rule between the entity type columns and before Total (as between original and
   cleaned in the crossover pop-up), none before the first entity type. Every figure cell is an .app-sharecell, so
   "a figure cell after a figure cell" picks the same columns in rows with and without the outcome label */
.app-fa-summary thead th:nth-child(n+4),
.app-fa-fields thead th:nth-child(n+4),
.app-assess-table td.app-sharecell + td.app-sharecell {
    border-left: 1px solid var(--row-rule);
}

/* The screen's error line takes no room in the header row until it has a message */
.app-fa-head #model-field-baseline-error:empty {
    display: none;
}

/* ---------- Assess > Record Assess (js/report/entity_baseline.js) ---------- */

.dataflow_alignment_baseline_header .page-description {
    margin: 8px 0 0;
    font: 400 14px/20px var(--font-display);
    color: var(--body-ink);
}

/* One block per feed: its jurisdiction, name and last poll, then its table (not the old grid of the container) */
.aligned-baseline-chart-container.app-ra-feed {
    display: block;
    margin: 22px 0 0;
}

.app-ra-feed__name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0 0 8px;
    font: 700 17px/24px var(--font-display);
    color: var(--heading-ink);
}

.app-ra-feed__source {
    font-weight: 600;
    color: var(--body-ink);
}

/* the jurisdiction, then (further off) the feed; Last polled on the right */
.app-ra-feed__name > span[data-jurisdiction] {
    margin-right: 14px;
}

.app-ra-feed__name > .av-small {
    margin-left: auto;
}

/* Field Assess with several compared feeds: a heading before each compared feed's clusters */
.app-fa-group {
    margin: 28px 0 4px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.app-fa-group:first-child {
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
}

.app-ra-filter__all {
    margin-bottom: 6px;
    font-weight: 600;
}

/* Record Field Assess: an arrow between the two feeds of a comparison */
.app-ra-feed__arrow {
    display: inline-flex;
    vertical-align: -3px;
    margin: 0 6px;
    color: var(--muted);
}

.app-ra-feed__arrow svg {
    width: 16px;
    height: 16px;
}

/* a code's record count in the reference code dialogs */
.app-refcode-count {
    font: 400 11.5px/16px var(--font-display);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* a feed in a heading: product name, then its provider in grey (js/modules/assess/compare_header.js) */
.app-ra-feed__product {
    font: 600 15px/24px var(--font-display);
    color: var(--heading-ink);
}

.app-ra-feed__provider {
    font: 400 13px/24px var(--font-display);
    color: var(--muted);
}

/* Assess tables: every column heading starts on the top line, level with the entity types (whose
   "Reconciled ..." line sits under them) */
.app-assess-table .av-table thead th {
    vertical-align: top;
}

.app-ra-table .av-table {
    table-layout: fixed;
    min-width: 960px;
}

.app-ra-table thead th:nth-child(1) {
    width: 190px;
}

/* A light rule between the entity type columns and before Total, none before the first entity type */
.app-ra-table thead th:nth-child(n+3) {
    border-left: 1px solid var(--row-rule);
}

.app-ra-table .app-ra-total th,
.app-ra-table .app-ra-total td {
    font-weight: 600;
    color: var(--heading-ink);
}

/* The svgs only mark where TableBar puts a figure */
.app-ra-table svg {
    display: none;
}

/* Changes (added, changed, deleted) as outlined v2.1 status pills; the row only shows when there are some */
.app-ra-table .app-ra-changes:not(:has(.changes a)) {
    display: none;
}

.app-ra-table .changes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.app-ra-table .changes a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 1px 8px;
    border: 1px solid var(--muted);
    border-radius: var(--radius-pill);
    font: 500 12px/16px var(--font-display);
    color: var(--heading-ink);
    background: var(--surface);
    cursor: pointer;
}

.app-ra-table .changes a::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
}

.app-ra-table .changes a.add::before { background: var(--status-new); }
.app-ra-table .changes a.change::before { background: var(--status-modified); }
.app-ra-table .changes a.delete::before { background: var(--status-removed); }

/* Variance figures under the feeds */
.app-ra-variance {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: end;
    gap: 4px 16px;
    margin: 16px 0 0;
    font: 400 14px/20px var(--font-display);
    color: var(--heading-ink);
}

.app-ra-variance dt {
    color: var(--body-ink);
    text-align: right;
}

.app-ra-variance dd {
    margin: 0;
}

/* Dialog widths (v2.1 Dialog is 480px; pop-ups with a list or a small table get a little more) */
.modal-content.app-dialog--narrow {
    width: min(480px, calc(100vw - 32px));
}

.modal-content.app-dialog--medium {
    width: min(640px, calc(100vw - 32px));
}

/* Record Assess filter: each chosen feed's reference codes side by side (js/modules/assess/record_assess/filter.js) */
.app-ra-filter {
    width: min(1040px, calc(100vw - 32px));
}

.app-ra-filter__option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.app-ra-filter__none {
    margin: 0;
    color: var(--muted);
}

.app-ra-filter__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.app-ra-filter__columns h3 {
    margin: 0 0 8px;
    font: 600 14px/20px var(--font-display);
    color: var(--heading-ink);
}

.app-ra-filter__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: 400 13px/18px var(--font-display);
}

.app-ra-filter__list input[type="checkbox"] {
    accent-color: var(--heading-ink);
}

.app-ra-count {
    color: var(--muted);
    font-weight: 400;
}

/* Record Assess unique entities breakdown: the step table in v2.1 table style. Key figures are bold; the outcomes
   carry a v2.1 status dot (missing red, misaligned grey, unique green) instead of a coloured cell */
.app-ra-unique {
    width: min(1200px, calc(100vw - 32px));
}

.app-ra-unique .entity-assessment-unique-container {
    display: grid;
    gap: 24px;
}

.app-ra-unique .entity-assessment-unique-container h2.modal-header {
    margin: 0 0 8px;
    font: 600 15px/22px var(--font-display);
    color: var(--heading-ink);
    text-align: left;
}

.app-ra-unique .entity-assessment-unique-grid {
    border-collapse: collapse;
    border: 1px solid var(--border);
    font: 400 13px/18px var(--font-display);
    color: var(--table-ink);
    font-variant-numeric: tabular-nums;
}

.app-ra-unique .entity-assessment-unique-grid th {
    padding: 8px 10px;
    background: var(--day-band);
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--row-rule);
    font: 600 12.5px/16px var(--font-display);
    color: var(--heading-ink);
    text-align: right;
    vertical-align: bottom;
}

.app-ra-unique .entity-assessment-unique-grid td {
    padding: 7px 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--row-rule);
    border-left: 1px solid var(--row-rule);
    text-align: right;
    white-space: nowrap;
}

.app-ra-unique .entity-assessment-unique-grid td b,
.app-ra-unique .entity-assessment-unique-grid td.total-records,
.app-ra-unique .entity-assessment-unique-grid td.total-unique,
.app-ra-unique .entity-assessment-unique-grid td.highlight {
    font-weight: 600;
    color: var(--heading-ink);
}

.app-ra-unique .entity-assessment-unique-grid td.missing,
.app-ra-unique .entity-assessment-unique-grid td.misaligned {
    color: var(--heading-ink);
}

.app-ra-unique .entity-assessment-unique-grid td.missing::before,
.app-ra-unique .entity-assessment-unique-grid td.misaligned::before,
.app-ra-unique .entity-assessment-unique-grid td.total-unique::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: var(--radius-pill);
    vertical-align: 1px;
}

.app-ra-unique .entity-assessment-unique-grid td.missing::before { background: var(--status-removed); }
.app-ra-unique .entity-assessment-unique-grid td.misaligned::before { background: var(--audit-prev-week); }
.app-ra-unique .entity-assessment-unique-grid td.total-unique::before { background: var(--status-new); }

.app-ra-unique .entity-assessment-unique-grid td[onclick] {
    cursor: pointer;
}

.app-ra-unique .entity-assessment-unique-grid td[onclick]:hover {
    background: var(--fill);
    text-decoration: underline;
}

.app-ra-unique .entity-assessment-unique-grid-differences {
    border-collapse: collapse;
}

.app-ra-unique .entity-assessment-unique-grid-differences th,
.app-ra-unique .entity-assessment-unique-grid-differences td {
    padding: 2px 8px;
    border: 0;
    background: none;
    font: 400 14px/20px var(--font-display);
    color: var(--body-ink);
    text-align: right;
}

.app-ra-unique .entity-assessment-unique-grid-differences td.missing {
    font-weight: 600;
    color: var(--heading-ink);
}

/* Record Assess: the comparison panel sticks under the page header (it starts there, so it does not move when
   scrolling begins); the description strip under it scrolls with the page */
.app-ra-head {
    position: sticky;
    top: var(--app-sticky-top);
    z-index: 6;
    margin: -16px 0 8px;
    padding: 16px 0 12px;
    background: var(--paper);
}

div[data-view="dataflow audit aligned record"] .dataflow_alignment_baseline_header {
    position: static;
    background: none;
}

/* Dialogs: the title, tabs and buttons stay put; only the body scrolls, and a table's headings stay at its top */
.modal-content.app-dialog {
    overflow: hidden;
}

.app-dialog .modal-body {
    flex: 1 1 auto;
    overflow: auto;
}

.app-dialog .modal-body .modal-scroll-content {
    max-height: none;
    overflow: visible;
}

.app-dialog .modal-body .av-table__frame {
    overflow: visible;
}

.app-dialog .modal-body .av-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ---------- Assess > Record Field Assess (js/report/record_field_assess.js) ---------- */

.app-rfa-head #record-field-assess-error:empty {
    display: none;
}

.app-rfa-filters__fields {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 28px;
}

.app-rfa-filters__group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.app-rfa-filters__group legend {
    float: left;
    margin-right: 10px;
    padding: 0;
}

.app-rfa-filters__options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font: 400 13px/18px var(--font-display);
    color: var(--heading-ink);
}

.app-rfa-filters__options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.app-rfa-filters__options input[type="checkbox"] {
    accent-color: var(--heading-ink);
    margin: 0;
}

.app-rfa-filters .av-select {
    width: auto;
    min-width: 110px;
}

.app-rfa-notice {
    margin-top: 22px;
}

/* Totals rows drawn by TableBar are bold, as the feed table's totals */
.app-assess-table .app-fa-total td {
    font-weight: 600;
    color: var(--heading-ink);
}

/* Record Field Assess record summary */
.app-rfa-summary thead th:first-child {
    width: 220px;
}

/* ---------- Value differences list (Field Assess and Record Field Assess drill-downs) ---------- */

#field-alignment-value-discrepancy-modal .modal-content,
#model-field-baseline-value-discrepancy-modal .modal-content {
    width: min(1400px, calc(100vw - 32px));
    background: var(--surface);
    gap: 12px;
}

#field-alignment-value-discrepancy-modal h2.modal-header,
#model-field-baseline-value-discrepancy-modal h2.modal-header {
    margin: 0;
    font: 600 17px/24px var(--font-display);
    color: var(--heading-ink);
}

#field-alignment-value-discrepancy-modal .value-discrepancy-content,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content {
    width: 100%;
    border-collapse: collapse;
    font: 400 13px/18px var(--font-display);
    color: var(--table-ink);
    font-variant-numeric: tabular-nums;
}

#field-alignment-value-discrepancy-modal .value-discrepancy-content thead th,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content thead th {
    padding: 8px 10px;
    background: var(--day-band) !important;
    border-bottom: 1px solid var(--border);
    font: 600 12.5px/16px var(--font-display);
    color: var(--heading-ink);
    text-align: left;
    vertical-align: bottom;
    white-space: nowrap;
}

#field-alignment-value-discrepancy-modal .value-discrepancy-content thead tr:first-child th,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content thead tr:first-child th {
    background: var(--surface) !important;
    border-bottom: 0;
}

#field-alignment-value-discrepancy-modal .value-discrepancy-content thead h2,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content thead h2 {
    margin: 0;
    font: 600 14px/20px var(--font-display);
    color: var(--heading-ink);
}

#field-alignment-value-discrepancy-modal .value-discrepancy-content td,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content td {
    padding: 6px 10px !important;
    border-bottom: 1px solid var(--row-rule);
    font-size: 13px;
    vertical-align: top;
}

#field-alignment-value-discrepancy-modal .value-discrepancy-content tbody tr:hover td,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content tbody tr:hover td {
    background: var(--fill);
}

/* The second feed's columns start with a light rule (it was a black line) */
#field-alignment-value-discrepancy-modal .value-discrepancy-content .connectedID,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content .connectedID,
#field-alignment-value-discrepancy-modal .value-discrepancy-content thead tr:first-child th + th,
#model-field-baseline-value-discrepancy-modal .value-discrepancy-content thead tr:first-child th + th {
    border-left: 1px solid var(--border) !important;
}

#field-alignment-value-discrepancy-modal .nav-buttons-container,
#model-field-baseline-value-discrepancy-modal .nav-buttons-container {
    justify-content: flex-end;
    margin: 0;
}


/* Back to top (application/views/shared_modals.php): the same raised square icon button as the feeds menu toggle */
.scrollToTop.av-app {
    width: var(--control-height);
    height: var(--control-height);
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--heading-ink);
    box-shadow: 0 1px 3px rgba(26, 26, 46, 0.12);
}

.scrollToTop.av-app:hover {
    background: var(--fill);
}

/* Reference code dialogs (Record Assess, Field Assess): each column's title, the feed's product with its provider on
   the line under it, so both columns' lists start level */
:is(.left-feed-title, .right-feed-title) .app-ra-feed__product {
    display: block;
    font: 600 14px/20px var(--font-display);
}

:is(.left-feed-title, .right-feed-title) .app-ra-feed__provider {
    display: block;
    min-height: 18px;
    font: 400 12px/18px var(--font-display);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Assess and Monitor screens (body data-nav, app/layout.php): the chosen feeds sit on the right of
   the page header as chips, the primary feed first with an arrow to the compared feeds. The chips are drawn by
   reinitializeSelectedFilterMenuOptions (js/application/filter_menu.js); clicking one still removes it. */
:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead__text {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    column-gap: 32px;
    align-items: end;
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead__text > :not(.selectedVendors) {
    grid-column: 1;
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    align-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors .source-container {
    position: relative;
    gap: 8px;
    padding: 5px 8px 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors .source-container:hover {
    background: var(--fill);
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors p:first-child {
    display: block;
    font: 500 12.5px/17px var(--font-display);
    color: var(--heading-ink);
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors .datafeed-source-vendor-name {
    display: block;
    font: 400 11.5px/16px var(--font-display);
    color: var(--muted);
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors img {
    width: 14px;
    height: 14px;
    filter: grayscale(1);
    opacity: 0.55;
}

/* the primary feed, then an arrow to the compared feeds */
:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors .source-container[data-sourcetype="primary"]:not(:last-child) {
    margin-right: 28px;
}

:is(body[data-nav="assess"], body[data-nav="monitor"]) .app-pagehead .selectedVendors .source-container[data-sourcetype="primary"]:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -26px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
