/* ============================================================================
   DART — brand tokens
   ----------------------------------------------------------------------------
   Every colour the application uses is declared here, once. Nothing else in the
   codebase should contain a hex value. Read docs/architecture/brand.md before
   changing anything here.

   1. Orange is a FILL, never a foreground on white (2.13:1). Use ink text on
      orange, and --dart-orange-text where orange-family text is needed on white.
   2. The --dart-cat-* swatches are not brand colours: charts and status marks
      only, never chrome.
   ============================================================================ */

:root {
    /* --- UTROV's brand. Two colours. Do not alter them. ------------------- */
    --dart-orange: #F99D1D;
    --dart-ink: #262626;

    /* --- Darkened for contrast only; not brand colours --------------------- */
    --dart-orange-hover: #E5901B; /* fill hover; ink text on it 6.01 */
    --dart-orange-text: #A46813; /* 4.60 on white — orange-family TEXT */
    --dart-ink-hover: #303030; /* white text on it 13.20 */
    --dart-ink-soft: #404040; /* a table's group rows, a step off ink (15 November 2026): white on it 10.37, orange 4.87 */

    /* --- Surfaces ---------------------------------------------------------- */
    --dart-surface: #FFFFFF;
    --dart-surface-muted: #F5F5F5;
    --dart-surface-dark: var(--dart-ink);

    /* --- Text -------------------------------------------------------------- */
    --dart-text: var(--dart-ink); /* 15.13 on white */
    --dart-text-muted: #5E5E5E; /* 6.48 on white */
    --dart-text-on-dark: #FFFFFF;
    --dart-text-on-orange: var(--dart-ink); /* 7.11 — never white */

    /* --- Application shell -------------------------------------------------- */
    --dart-sidebar-width: 240px;
    --dart-sidebar-collapsed-width: 56px;

    /* The one left edge in the sidebar for wordmark, headings and icons. A nav
       link subtracts its 3px accent border from it. At 56px collapsed it
       centres the 24px icon (16 + 24 + 16). */
    --dart-sidebar-gutter: 1rem;

    /* Wider than the rail, for thumbs. */
    --dart-sidebar-offcanvas-width: 280px;
    --dart-sidebar-bg: var(--dart-ink);
    --dart-sidebar-color: #C9C9C9; /* 8.6 on ink */
    --dart-sidebar-hover-bg: rgba(255, 255, 255, .06);
    --dart-sidebar-active-bg: rgba(255, 255, 255, .10);
    --dart-sidebar-active-accent: var(--dart-orange); /* 7.11 on ink */
    --dart-sidebar-border: rgba(255, 255, 255, .08);

    --dart-header-bg: var(--dart-surface);
    --dart-header-border: rgba(0, 0, 0, .08);
    --dart-content-bg: var(--dart-surface-muted);

    /* --- Logo ---------------------------------------------------------------
       The wordmark is 7.43:1. Set a width only; setting both distorts it.
       Widths are of the cropped artwork; clear space is layout padding.
       See brand.md §5. */
    --dart-logo-width: 101px;
    --dart-logo-width-login: 145px;

    /* --- Status -------------------------------------------------------------
       Two greens: the darkened one (4.52 on white) for ticks and text, UTROV's
       (2.87) for filled badges only. */
    --dart-status-ok: #00893E; /* ticks, icons, text */
    --dart-status-ok-fill: #00B050; /* filled badges only */
    --dart-status-pending: #5E5E5E;
    --dart-status-warn: var(--dart-orange);
    --dart-status-error: #C00000;
    --dart-status-info: #0070C0;

    /* --- Report and chart categories ----------------------------------------
       Colour-coding only, never chrome. Not yet validated as a chart palette. */
    --dart-cat-red: #C00000;
    --dart-cat-orange: #F99D1D;
    --dart-cat-green: #00B050;
    --dart-cat-blue: #0070C0;
    --dart-cat-purple: #7030A0;
    --dart-cat-brown: #7A422E;
    --dart-cat-grey: #5E5E5E;
    --dart-cat-ink: #262626;

    /* --- The report look ---------------------------------------------------
       The printed DPRs' surfaces, lines and fills (dart-dpr-print.css), and on
       the screen the same (dart-layout.css, "Report look"; trial, 14 November
       2026): one source, so a section box, a chip or a tile is the same on
       paper and on the screen. Fills and lines only: text on them is ink or
       the muted grey, every pair measured at 4.5:1 or more on the screen. */
    --dart-report-line: #DDDDDD; /* a box's edge, a table's head rule */
    --dart-report-line-soft: #ECECEC; /* between rows */
    --dart-report-fill: var(--dart-surface-muted); /* a title strip, a tile; muted text 5.95 on it */
    --dart-report-total-fill: #FAFAFA; /* a totals row; muted text 6.21 on it */
    --dart-report-chip: #DADADA; /* a code that is not work; ink 10.83 on it */
    --dart-report-tile-edge: #D0D0D0; /* a tile with nothing in it, its left edge */
    --dart-report-rule: var(--dart-orange); /* under a strip and on a tile's edge: decoration only */
    --dart-title-bar-width: 2px; /* the orange bar left of a page's or a record's title; 4px until 21 November 2026 */

    /* On the ink header bar (14 November 2026 trial): the sync state, light
       enough to read on ink. ok 8.26, error 6.67; the warning is the brand
       orange, 7.11 on ink. */
    --dart-on-ink-muted: var(--dart-sidebar-color); /* 9.14 on ink */
    --dart-on-ink-ok: #6FD39A;
    --dart-on-ink-error: #FF8A8A;

    /* --- Offshore ergonomics ------------------------------------------------
       Vessel control sizes. See .dart-shell-offline in dart-layout.css. */
    --dart-touch-target: 3rem;
    --dart-touch-font: 1.05rem;

    /* --- Sizes outside either shell -----------------------------------------
       Bootstrap's own, for a page with no density class: the sign-in page. The
       two densities below override every one of them. */
    --dart-font-size: 1rem;
    --dart-font-size-sm: .875rem;
    --dart-font-size-xs: .75rem;
    --dart-font-size-lg: 1.25rem;
    --dart-font-size-md: 1rem;
    --dart-font-size-intro: .875rem;
    --dart-control-height: auto;
    --dart-row-height: auto;
    --dart-header-height: auto;
    --dart-header-padding-y: .5rem;
    --dart-radius-control: .375rem;
    --dart-radius-card: .375rem;
    --dart-nav-font-size: .95rem;
    --dart-nav-item-height: 40px;
    --dart-row-action-size: 2rem;
    --dart-table-stripe-bg: rgba(0, 0, 0, .05); /* Bootstrap's, on its #000: literal, as emphasis is now ink */
    --dart-table-hover-bg: rgba(0, 0, 0, .075); /* Bootstrap's, likewise */
}

/* ===== Density (ADR 0017) ==================================================
   One set of sizes per host, chosen by DartShellOptions.Density: the layout
   puts dart-shell-offline (Touch, the vessel) or dart-shell-compact (Compact,
   both hosts' default) on the body, from the Shell:Density setting. Code reads the option, never these classes; CSS reads
   the classes. "auto" means as Bootstrap lays it out.

   Touch is the vessel's sizes as they were before compact existed, named. Do
   not shrink it to match compact: it is for a machine used standing up, in poor
   light, on a moving vessel (ADR 0005). */

.dart-shell-offline {
    --dart-font-size: var(--dart-touch-font); /* 16.8px */
    --dart-font-size-sm: .875rem;
    --dart-font-size-xs: .75rem;
    --dart-font-size-lg: 1.25rem;
    --dart-font-size-md: 1rem;
    --dart-font-size-intro: .875rem;
    --dart-control-height: var(--dart-touch-target); /* 48px fields */
    --dart-row-height: auto;
    --dart-header-height: auto;
    --dart-header-padding-y: .5rem;
    --dart-radius-control: .375rem;
    --dart-radius-card: .375rem;
    --dart-nav-font-size: .95rem;
    --dart-nav-item-height: 40px;
    --dart-row-action-size: 2.5rem; /* dart-layout.css */
    --dart-table-stripe-bg: rgba(0, 0, 0, .05); /* Bootstrap's, on its #000: literal, as emphasis is now ink */
    --dart-table-hover-bg: rgba(0, 0, 0, .075); /* Bootstrap's, table-hover only */
}

/* Both hosts' default since 5 November 2026: rows per screen matter in the office, and a vessel's small, high-resolution laptop leaves a small window (ADR 0017). */
.dart-shell-compact {
    /* Two sizes up from 13px (21 November 2026): the old 2400px step, at every width. */
    --dart-font-size: 15px;
    --dart-font-size-sm: 14px;
    --dart-font-size-xs: 13px;
    --dart-font-size-lg: 18px;
    --dart-font-size-md: 16px; /* a record's parent beside its title */
    --dart-font-size-intro: 14.5px; /* a page's introduction, under its title row */
    --dart-page-title-size: 21px;
    --dart-section-title-size: 17px; /* h5 */
    --dart-control-height: 35px;
    --dart-control-height-sm: 28px;
    --dart-row-height: 32px;
    --dart-header-height: 51px;
    --dart-header-padding-y: 0;
    --dart-radius-control: 4px;
    --dart-radius-card: 2px; /* all but square (21 November 2026: 8px, then 4px, read too round on a panel) */
    --dart-nav-font-size: 15px;
    --dart-nav-item-height: 37px;
    --dart-row-action-size: 28px;
    --dart-table-stripe-bg: #F6F6F6;
    /* ON TRIAL (Ingvar, 20 November 2026): the brand orange at 18%, see-through, which is #FEEDD6 on
       white; it was #EEEEEE, a shade darker than the stripe and hard to tell from it. Ink on it is
       13.2:1; the orange link text falls from 4.6:1 to 4.0:1 while its row is hovered. */
    --dart-table-hover-bg: rgba(249, 157, 29, .18);

    /* Derived, so a control and a row come out at the heights above whatever
       the type: (height - one line - borders) / 2. A line is 1.5 x the size. */
    --dart-control-padding-y: calc((var(--dart-control-height) - var(--dart-font-size) * 1.5 - 2 * var(--bs-border-width)) / 2);
    --dart-control-padding-y-sm: calc((var(--dart-control-height-sm) - var(--dart-font-size-sm) * 1.5 - 2 * var(--bs-border-width)) / 2);
    --dart-control-padding-x: 9px;
    --dart-cell-padding-y: calc((var(--dart-row-height) - var(--dart-font-size) * 1.5 - var(--bs-border-width)) / 2);
    --dart-cell-padding-x: 7px;

    /* A row-action chip on a hovered row: see-through ink, so it darkens whatever the row's hover is. */
    --dart-dt-action-hover-bg: rgba(0, 0, 0, .12);

    /* Widths (19 November 2026, ADR 0017; 20 November 2026): how long a line
       of text and how wide a form may be on a 2560px screen. A panel and a
       list have no limit: each runs from edge to edge of the page.
       Multiples of the body type, and worked out here, on the body, so each
       is one length wherever it is used: written in em, it would be shorter on
       smaller text. At 15px: the reading width 1800px; a form 840px. */
    --dart-reading-width: calc(var(--dart-font-size) * 120);
    --dart-form-width: calc(var(--dart-font-size) * 56);
    --dart-form-width-wide: calc(var(--dart-font-size) * 65); /* dart-form-frame-wide */
    --dart-form-width-wider: calc(var(--dart-font-size) * 75); /* dart-form-frame-wider */
}

/* Compact is one set of sizes at every window width (21 November 2026). The steps up
   at 1920px and 2400px of viewport (14 November 2026) are gone: they measured the
   window, not the screen, so the type shrank when a window was narrowed or snapped.
   Type too small on a large screen is Windows' display scaling or the browser's zoom. */

/* Bootstrap's own sizes, pointed at the compact tokens, so a Bootstrap
   component on any page follows without a class of its own. The touch density
   keeps Bootstrap's and adds the larger targets in dart-layout.css. */
.dart-shell-compact {
    --bs-body-font-size: var(--dart-font-size);
    --bs-border-radius: var(--dart-radius-control);
    --bs-border-radius-sm: var(--dart-radius-control);
    --bs-border-radius-lg: var(--dart-radius-card);

    /* Times, counts and kilos line up in their columns. */
    font-variant-numeric: tabular-nums;
}

.dart-shell-compact .form-control,
.dart-shell-compact .form-select,
.dart-shell-compact .input-group-text {
    min-height: var(--dart-control-height);
    padding-top: var(--dart-control-padding-y);
    padding-bottom: var(--dart-control-padding-y);
    padding-left: var(--dart-control-padding-x);
    font-size: var(--dart-font-size);
}

.dart-shell-compact .form-control,
.dart-shell-compact .input-group-text {
    padding-right: var(--dart-control-padding-x);
}

/* Room for the arrow, which sits the same distance in. */
.dart-shell-compact .form-select {
    padding-right: calc(var(--dart-control-padding-x) + 20px);
    background-position: right var(--dart-control-padding-x) center;
}

.dart-shell-compact .form-control-sm,
.dart-shell-compact .form-select-sm {
    min-height: var(--dart-control-height-sm);
    padding-top: var(--dart-control-padding-y-sm);
    padding-bottom: var(--dart-control-padding-y-sm);
    font-size: var(--dart-font-size-sm);
}

/* textarea keeps its rows; only its type and padding follow. */
.dart-shell-compact textarea.form-control {
    min-height: calc(var(--dart-control-height) * 2);
}

.dart-shell-compact .form-label {
    margin-bottom: .25rem;
}

/* Help under a field at the small size, not Bootstrap's .875em, which is 11.4px here. */
.dart-shell-compact .form-text {
    font-size: var(--dart-font-size-sm);
}

/* A checkbox is one line of the type, not Bootstrap's 1.5rem; in a table row
   the 24px would heighten the row. */
.dart-shell-compact .form-check {
    min-height: calc(var(--dart-font-size) * 1.5);
}

.dart-shell-compact .btn {
    --bs-btn-font-size: var(--dart-font-size);
    --bs-btn-padding-y: var(--dart-control-padding-y);
    --bs-btn-padding-x: 10px;
}

/* After .btn, which would otherwise win over Bootstrap's .btn-sm. */
.dart-shell-compact .btn-sm,
.dart-shell-compact .btn-group-sm > .btn {
    --bs-btn-font-size: var(--dart-font-size-sm);
    --bs-btn-padding-y: var(--dart-control-padding-y-sm);
    --bs-btn-padding-x: 8px;
}

/* The page buttons under a list, at the control height. */
.dart-shell-compact .pagination {
    --bs-pagination-font-size: var(--dart-font-size);
    --bs-pagination-padding-y: var(--dart-control-padding-y);
    --bs-pagination-padding-x: 10px;
}

.dart-shell-compact .dropdown-menu {
    --bs-dropdown-font-size: var(--dart-font-size);
    --bs-dropdown-item-padding-y: 4px;
}

/* Cards 8px; controls 4px through --bs-border-radius above. The content card
   is square on the vessel (dart-layout.css) and rounded here. */
.dart-shell-compact .card {
    --bs-card-border-radius: var(--dart-radius-card);
    --bs-card-inner-border-radius: calc(var(--dart-radius-card) - var(--bs-border-width));
}

/* Table cells, plain tables and DataTables alike, table-sm included: one line
   of type comes out at --dart-row-height. */
.dart-shell-compact .table > :not(caption) > * > * {
    padding: var(--dart-cell-padding-y) var(--dart-cell-padding-x);
}

/* The page title is the <h4> every page opens with; the others step down from
   it, so a section heading is never larger than the page's. */
.dart-shell-compact h1, .dart-shell-compact .h1 { font-size: calc(var(--dart-page-title-size) + 6px); }
.dart-shell-compact h2, .dart-shell-compact .h2 { font-size: calc(var(--dart-page-title-size) + 2px); }
.dart-shell-compact h3, .dart-shell-compact .h3 { font-size: var(--dart-page-title-size); }

.dart-shell-compact h4,
.dart-shell-compact .h4 {
    font-size: var(--dart-page-title-size);
    font-weight: 600;
}

.dart-shell-compact h5, .dart-shell-compact .h5 { font-size: var(--dart-section-title-size); font-weight: 600; }
.dart-shell-compact h6, .dart-shell-compact .h6 { font-size: var(--dart-font-size); font-weight: 600; }

/* Bootstrap's own variables, pointed at the brand. Links use the darkened
   orange text colour, never the brand orange.

   The -rgb variants are not optional: Bootstrap 5.3 reads them for links.
   Keep them in step by hand with the hex values above.
   #A46813 = 164 104 19. #262626 = 38 38 38. */
:root {
    --bs-primary: var(--dart-ink);
    --bs-primary-rgb: 38, 38, 38;

    /* Bootstrap's text colours are the brand's (ADR 0017): body and emphasis
       text in ink, where Bootstrap has #212529 and, in tables, #000; and its
       secondary grey, text-body-secondary and form-text, in the muted grey.
       Ink on white is 15.13:1 (Bootstrap's #000 was 21); the muted grey 6.48
       (Bootstrap's 6.78), 5.59 at worst, on a hovered row. brand.md §3. */
    --bs-body-color: var(--dart-text);
    --bs-body-color-rgb: 38, 38, 38;
    --bs-emphasis-color: var(--dart-text);
    --bs-emphasis-color-rgb: 38, 38, 38;
    --bs-secondary-color: var(--dart-text-muted);
    --bs-secondary-color-rgb: 94, 94, 94;

    --bs-link-color: var(--dart-orange-text);
    --bs-link-color-rgb: 164, 104, 19;
    --bs-link-hover-color: var(--dart-ink);
    --bs-link-hover-color-rgb: 38, 38, 38;

    /* A refused field is the one red, whether Bootstrap's is-invalid marks it
       or ASP.NET's input-validation-error (dart-layout.css). */
    --bs-form-invalid-color: var(--dart-status-error);
    --bs-form-invalid-border-color: var(--dart-status-error);

    /* Bootstrap's danger is the status red too: text-danger (the field
       messages), link-, border-, bg- and text-bg-danger, and the invalid focus
       rings read these. Its buttons do not; see .btn-danger below.
       #C00000 = 192 0 0. */
    --bs-danger: var(--dart-status-error);
    --bs-danger-rgb: 192, 0, 0;

    /* And its pale form, for alert-danger (dart.alert's error): the text the
       red darkened with ink, the fill and border the red thinned with white.
       Text on the fill measured 7.34:1 in the browser (brand.md §6). */
    --bs-danger-text-emphasis: color-mix(in srgb, var(--dart-status-error) 70%, var(--dart-ink));
    --bs-danger-bg-subtle: color-mix(in srgb, var(--dart-status-error) 12%, white);
    --bs-danger-border-subtle: color-mix(in srgb, var(--dart-status-error) 30%, white);
}

/* Links are not underlined (Ingvar, 21 November 2026): the orange text tells a link
   from the ink around it, 3.3:1 against it (WCAG asks 3:1), 4.6:1 on white, and the
   underline comes back on hover and on keyboard focus. The hover rule has an
   element's weight alone, so a button or a nav link that is an <a> keeps its own. */
a {
    text-decoration: none;
}

a:where(:hover, :focus-visible) {
    text-decoration: underline;
}

/* Pagination does not read --bs-primary; set the current page to ink. */
.pagination {
    --bs-pagination-color: var(--dart-text);
    --bs-pagination-hover-color: var(--dart-text);
    --bs-pagination-focus-color: var(--dart-text);
    --bs-pagination-active-bg: var(--dart-ink);
    --bs-pagination-active-border-color: var(--dart-ink);
    --bs-pagination-active-color: var(--dart-text-on-dark);
}

/* DataTables 3 row colours, as channel triplets. dart-datatables.css maps
   DataTables' variables onto these, since it loads after their stylesheets. */
:root {
    --dart-dt-selected-rgb: 38, 38, 38;
    --dart-dt-selected-text-rgb: 255, 255, 255;
    --dart-dt-selected-link-rgb: 249, 157, 29;
    --dart-dt-order-arrow: rgb(38, 38, 38);

    /* Row action icons in ink, like the primary buttons; hover lifts them onto
       a chip. A destructive action turns red only on hover. */
    --dart-dt-action: var(--dart-text); /* 15.13 on white */
    --dart-dt-action-hover: var(--dart-text);
    --dart-dt-action-hover-bg: #ECECEC;
    --dart-dt-danger-hover: var(--dart-status-error);
    --dart-dt-danger-hover-bg: #FBEAEA; /* status-error 5.6 on it */

    /* yesNo: tick in the brand green, dash decorative (Yes/No is in the text). */
    --dart-dt-yes: var(--dart-status-ok);
    --dart-dt-no: #9A9A9A;
}

/* The primary button is ink with white text. Do not make it orange: white on
   orange fails contrast. */
.btn-primary {
    --bs-btn-bg: var(--dart-ink);
    --bs-btn-border-color: var(--dart-ink);
    --bs-btn-color: var(--dart-text-on-dark);
    --bs-btn-hover-bg: var(--dart-ink-hover);
    --bs-btn-hover-border-color: var(--dart-ink-hover);
    --bs-btn-active-bg: #000000;
    --bs-btn-active-border-color: #000000;
    --bs-btn-disabled-bg: var(--dart-text-muted);
    --bs-btn-disabled-border-color: var(--dart-text-muted);
}

/* The focus ring, on both hosts (ADR 0017): a 2px ink outline a little off
   the control, in place of Bootstrap's pale blue glow. Ink, never orange: a
   focus ring needs 3:1 against what is beside it, and the brand orange is 2.13
   on white; ink is 15.13 on white and 13.88 on the entry panel's grey. A
   refused field's ring is the status red (6.48), in dart-layout.css. The dark
   sidebar keeps its own light ring, as ink would vanish on it. */
:root {
    --dart-focus-ring-color: var(--dart-ink);
    --dart-focus-ring-width: 2px;
    --dart-focus-ring-offset: 1px;

    /* Bootstrap's focus-ring utility and anything else reading it. */
    --bs-focus-ring-color: var(--dart-ink);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible,
.btn-check:focus-visible + .btn,
.page-link:focus-visible {
    box-shadow: none;
    outline: var(--dart-focus-ring-width) solid var(--dart-focus-ring-color);
    outline-offset: var(--dart-focus-ring-offset);
}

/* A field keeps its own border under the ring, not Bootstrap's pale blue one;
   a ticked box keeps the border its tick gives it. */
.form-control:focus,
.form-select:focus,
.form-check-input:not(:checked):focus {
    border-color: var(--bs-border-color);
}

/* A page button clicked with the mouse has no glow; the ring shows from the keyboard. */
.page-link:focus {
    box-shadow: none;
}

/* Bootstrap's "primary" is ink everywhere, on both hosts (ADR 0017). --bs-primary
   and its -rgb are mapped above; these are the parts Bootstrap compiles with its
   blue as a literal and so never read the variable, as the danger buttons did.
   The tick, dot and switch knob on ink are white: 15.13:1, against the 3:1 a
   control's state needs. Links keep --dart-orange-text; info keeps its blue. */
:root {
    --bs-primary-text-emphasis: var(--dart-ink);
    --bs-primary-bg-subtle: color-mix(in srgb, var(--dart-ink) 8%, white);
    --bs-primary-border-subtle: color-mix(in srgb, var(--dart-ink) 25%, white);
}

/* Checked and part-checked boxes, radios and switches. */
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--dart-ink);
    border-color: var(--dart-ink);
}

/* A focused switch's knob was the pale blue; the ring says it has focus. */
.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}

.form-range::-webkit-slider-thumb {
    background-color: var(--dart-ink);
}

.form-range::-moz-range-thumb {
    background-color: var(--dart-ink);
}

.form-range::-webkit-slider-thumb:active {
    background-color: var(--dart-ink-hover);
}

.form-range::-moz-range-thumb:active {
    background-color: var(--dart-ink-hover);
}

/* Separate rules: a browser drops a whole list holding another engine's pseudo-element. */
.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px var(--dart-surface), 0 0 0 3px var(--dart-focus-ring-color);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px var(--dart-surface), 0 0 0 3px var(--dart-focus-ring-color);
}

/* The highlighted item of a dropdown, the active pill and list item, a progress bar. */
.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--dart-ink);
    --bs-dropdown-link-active-color: var(--dart-text-on-dark);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--dart-ink);
}

.list-group {
    --bs-list-group-active-bg: var(--dart-ink);
    --bs-list-group-active-border-color: var(--dart-ink);
}

.progress,
.progress-stacked {
    --bs-progress-bar-bg: var(--dart-ink);
}

/* An open accordion's chevron, and the primary table row, on the ink tints. */
.accordion {
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23262626' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    --bs-accordion-btn-focus-box-shadow: none;
}

.accordion-button:focus-visible,
.btn-close:focus-visible {
    outline: var(--dart-focus-ring-width) solid var(--dart-focus-ring-color);
    outline-offset: var(--dart-focus-ring-offset);
}

/* A toast's and a dialog's close button: the ring, not the blue glow. */
.btn-close {
    --bs-btn-close-focus-shadow: none;
}

.table-primary {
    --bs-table-color: var(--dart-text);
    --bs-table-bg: var(--bs-primary-bg-subtle);
    --bs-table-border-color: var(--bs-primary-border-subtle);
    --bs-table-striped-bg: color-mix(in srgb, var(--dart-ink) 12%, white);
    --bs-table-striped-color: var(--dart-text);
    --bs-table-active-bg: color-mix(in srgb, var(--dart-ink) 18%, white);
    --bs-table-active-color: var(--dart-text);
    --bs-table-hover-bg: color-mix(in srgb, var(--dart-ink) 15%, white);
    --bs-table-hover-color: var(--dart-text);
}

/* The outline button in ink,
   never Bootstrap's blue: blue is for information only (ADR 0017). Filled ink
   on hover. On both hosts. */
.btn-outline-primary {
    --bs-btn-color: var(--dart-text);
    --bs-btn-border-color: var(--dart-text);
    --bs-btn-bg: transparent;
    --bs-btn-hover-color: var(--dart-text-on-dark);
    --bs-btn-hover-bg: var(--dart-ink);
    --bs-btn-hover-border-color: var(--dart-ink);
    --bs-btn-active-color: var(--dart-text-on-dark);
    --bs-btn-active-bg: var(--dart-ink-hover);
    --bs-btn-active-border-color: var(--dart-ink-hover);
    --bs-btn-disabled-color: var(--dart-text-muted);
    --bs-btn-disabled-border-color: var(--dart-text-muted);
    --bs-btn-focus-shadow-rgb: 38, 38, 38;
}

/* The quiet outline button (Cancel, Now, Reset table and the like) in the brand's
   muted grey, not Bootstrap's #6c757d, which read as disabled: text and border
   6.48:1 on white, filled grey with white text on hover. Quieter than the ink
   outline (.btn-outline-primary) beside it. On both hosts (14 November 2026). */
.btn-outline-secondary {
    --bs-btn-color: var(--dart-text-muted);
    --bs-btn-border-color: var(--dart-text-muted);
    --bs-btn-hover-color: var(--dart-text-on-dark);
    --bs-btn-hover-bg: var(--dart-text-muted);
    --bs-btn-hover-border-color: var(--dart-text-muted);
    --bs-btn-active-color: var(--dart-text-on-dark);
    --bs-btn-active-bg: color-mix(in srgb, var(--dart-text-muted) 80%, var(--dart-ink));
    --bs-btn-active-border-color: color-mix(in srgb, var(--dart-text-muted) 80%, var(--dart-ink));
    --bs-btn-disabled-color: var(--dart-text-muted);
    --bs-btn-disabled-border-color: var(--dart-text-muted);
    --bs-btn-focus-shadow-rgb: 94, 94, 94;
}

/* The danger buttons in the status red. Bootstrap compiles their colours as
   literals rather than reading --bs-danger, so they are mapped here, as the
   primary button is. White on the red is 6.48:1; hover and press darken it
   towards ink. */
.btn-danger {
    --bs-btn-bg: var(--dart-status-error);
    --bs-btn-border-color: var(--dart-status-error);
    --bs-btn-color: var(--dart-text-on-dark);
    --bs-btn-hover-bg: color-mix(in srgb, var(--dart-status-error) 85%, var(--dart-ink));
    --bs-btn-hover-border-color: color-mix(in srgb, var(--dart-status-error) 85%, var(--dart-ink));
    --bs-btn-hover-color: var(--dart-text-on-dark);
    --bs-btn-active-bg: color-mix(in srgb, var(--dart-status-error) 75%, var(--dart-ink));
    --bs-btn-active-border-color: color-mix(in srgb, var(--dart-status-error) 75%, var(--dart-ink));
    --bs-btn-active-color: var(--dart-text-on-dark);
    --bs-btn-focus-shadow-rgb: 192, 0, 0;
    --bs-btn-disabled-bg: var(--dart-status-error);
    --bs-btn-disabled-border-color: var(--dart-status-error);
}

.btn-outline-danger {
    --bs-btn-color: var(--dart-status-error);
    --bs-btn-border-color: var(--dart-status-error);
    --bs-btn-hover-bg: var(--dart-status-error);
    --bs-btn-hover-border-color: var(--dart-status-error);
    --bs-btn-hover-color: var(--dart-text-on-dark);
    --bs-btn-active-bg: color-mix(in srgb, var(--dart-status-error) 85%, var(--dart-ink));
    --bs-btn-active-border-color: color-mix(in srgb, var(--dart-status-error) 85%, var(--dart-ink));
    --bs-btn-active-color: var(--dart-text-on-dark);
    --bs-btn-focus-shadow-rgb: 192, 0, 0;
    --bs-btn-disabled-color: var(--dart-status-error);
    --bs-btn-disabled-border-color: var(--dart-status-error);
}

/* Orange fill with ink text, for the one action on a screen that should stand out. */
.btn-accent {
    --bs-btn-bg: var(--dart-orange);
    --bs-btn-border-color: var(--dart-orange);
    --bs-btn-color: var(--dart-text-on-orange);
    --bs-btn-hover-bg: var(--dart-orange-hover);
    --bs-btn-hover-border-color: var(--dart-orange-hover);
    --bs-btn-hover-color: var(--dart-text-on-orange);
    --bs-btn-active-bg: var(--dart-orange-hover);
    --bs-btn-active-border-color: var(--dart-orange-hover);
    --bs-btn-active-color: var(--dart-text-on-orange);
    --bs-btn-disabled-bg: var(--dart-text-muted);
    --bs-btn-disabled-border-color: var(--dart-text-muted);
    --bs-btn-disabled-color: var(--dart-text-on-dark);
}
