@font-face {
    font-family: "Graphik";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/graphik/Graphik-Regular-Web.woff") format("woff");
}

@font-face {
    font-family: "Graphik";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/fonts/graphik/Graphik-Medium-Web.woff") format("woff");
}

@font-face {
    font-family: "Graphik";
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("/fonts/graphik/Graphik-Bold-Web.woff") format("woff");
}

@font-face {
    font-family: "Graphik";
    font-style: normal;
    font-weight: 800 900;
    font-display: swap;
    src: url("/fonts/graphik/Graphik-Black-Web.woff") format("woff");
}

:root {
    /* Green appears in small spots only; everything else is ink and grey.
       There are two of it (Green 600 and 700 in the Figma palette). The
       brighter one marks what is active: the focus ring, the text of
       whatever is selected, a button under the pointer. The deeper one is
       for solid fills at rest: the main button and a ticked checkbox. */
    --collection-accent: #016a26;
    --collection-accent-strong: #185630;
    --collection-accent-hover: #016a26;
    --collection-accent-soft: rgb(1 106 38 / 8%);
    --collection-accent-text: #016a26;
    --collection-bg: #fff;
    --collection-border: #e4e7e6;
    --collection-button-disabled-bg: #edf0ee;
    --collection-button-disabled-text: #a7aca9;
    /* The main action on a form -- Save, Create, Apply -- is the deep green
       and brightens to the active green when pointed at. A destructive
       button is the deep red with the same white label, and brightens the
       same way. Both reds are the same on the dark page: it is the fill
       behind a white label, which has to stay dark. */
    --collection-button-primary-bg: var(--collection-accent-strong);
    --collection-button-primary-hover: var(--collection-accent);
    --collection-button-danger-bg: #a82200;
    --collection-button-danger-hover: #c43a1c;
    --collection-button-secondary-bg: var(--collection-accent-strong);
    --collection-button-secondary-hover: var(--collection-accent);
    --collection-button-tertiary-bg: #edf0ee;
    --collection-button-tertiary-hover: #e4e7e6;
    --collection-button-tertiary-selected-bg: #d1d5d2;
    --collection-button-tertiary-selected-text: #141a16;
    --collection-button-tertiary-text: #202622;
    --collection-button-text-on-color: #fff;
    --collection-cell-hover: #e4e7e6;
    --collection-control-height: 2.5rem;
    /* A form field's resting fill. Fields have no outline until focused. */
    --collection-field-bg: #edf0ee;
    /* The edit panel's ground: the lightest grey, a step under a field's. */
    --collection-panel-bg: #f7f8f7;
    /* The grid's density, in one place. A row is the cell's two paddings plus
       one 1.25rem line; the header is its own height. The 2px the top padding
       has over the bottom sits text optically centred on its x-height. */
    --collection-row-height: 2.5rem;
    /* How far a row carries in from the right as the list arrives. Small on
       purpose: the rows are wide, so a little travel reads as a lot. */
    --collection-row-in-shift: 0.5rem;
    /* An item's name on its own page: half again the 48px a page heading
       takes, with its subtitle set to match underneath. */
    --collection-page-title-size: 4.5rem;
    --collection-page-title-line: 4.75rem;
    /* Closes the gap a schema leaves between two fields, so the subtitle
       runs straight on from the name as the next line of one heading. */
    --collection-page-title-gap: 1.625rem;
    --collection-cell-pad-top: 0.6875rem;
    --collection-cell-pad-bottom: 0.5625rem;
    --collection-cell-pad-inline: 0.75rem;
    /* Grid text stays at 16px: 14px was tried and was too small to read
       comfortably. Only the column headings, which are labels rather than
       content, are set smaller. */
    --collection-grid-font-size: 1rem;
    --collection-grid-header-height: 2.5rem;
    --collection-grid-header-font-size: 0.875rem;
    /* One shape for everything a pointer lands on: buttons, fields, the
       current nav item, a hovered or selected row. All are 2.5rem tall with
       this radius, and set their text at the same height inside. */
    --collection-control-radius: 0.5rem;
    /* Tokens are half a control's height, so they take half its radius. */
    --collection-token-radius: 0.25rem;
    --collection-danger: #a82200;
    /* Red 500 from the palette: bright enough to see as a 2px line. */
    --collection-loading-bar: #c43a1c;
    /* One table row, so the rows below it keep the rhythm the nav is on. */
    --collection-filter-bar-height: var(--collection-row-height);
    --collection-footer-height: 4.5rem;
    --collection-hover: #edf0ee;
    /* The space between the header band and the column headings. With the
       search item starting flush under the band in the sidebar, this leaves
       the same 24px under the title's baseline as there is above its
       capitals and to its left. */
    --collection-grid-sticky-offset: 0.75rem;
    /* The fixed band holding the page title and the toolbar. Everything below
       it is positioned against this, so the two values move together. */
    /* 80px, of which the top 20px is clear space: the title's 48px capitals
       (36px tall) are centred in the 60px beneath that, which puts 32px
       above them -- the gutter to their left -- and their baseline 12px above
       the band's bottom edge, so the first line of text under the band comes
       about the same 32px below it. */
    --collection-header-height: 6.5rem;
    --collection-header-top-inset: 1.25rem;
    --collection-toolbar-gap: 0.5rem;
    /* The space between the toolbar and the create button beside it. Each
       list page sets its offset aside as the button's own width plus this, so
       the gap reads the same on every page however long the label is. Widths
       were measured from the rendered button; a relabelled button needs its
       width remeasured. */
    /* The gap between the toolbar and the create button beside it. The
       offsets below add the frame's padding themselves, so this is the gap
       alone and does not have to be retuned when that padding changes. */
    --collection-toolbar-clearance: 0.5rem;
    /* Clearance around a token's remove mark: between it and the label, and
       between it and the token's trailing edge. Matches the token's vertical
       padding so the space reads the same on every side. */
    --collection-token-gap: 0.375rem;
    /* The remove mark's size on screen. The icon behind it fills its viewBox
       edge to edge, so this number is the mark, with nothing to divide by. */
    --collection-token-mark: 0.5625rem;
    /* The mark is painted from this shape rather than from the icon Filament
       puts in the button, because that icon is not always the same one: badges
       built in Blade take the aliased collection-token-remove, while a select
       builds its chips in JavaScript and hardcodes an x-mark of its own whose
       ink covers about 47% of its viewBox -- so an 11px button drew a 5px
       mark. Painting it here makes the mark exactly --collection-token-mark
       wherever a token appears. */
    --collection-token-mark-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'><path d='M1 1 15 15M15 1 1 15'/></svg>");
    /* The line box a token's label sits on. The mark centres on the first
       one, so it reads as centred on a single-line token and stays at the top
       right when the label wraps. */
    --collection-token-line: 1.25rem;
    /* The mark a boolean cell shows for yes. Drawn edge to edge in its
       viewBox, like the token mark, so its size on screen is the size set. */
    --collection-check-mark-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1.5 8.5 6 13 14.5 3'/></svg>");
    /* Set so the space above and below the mark equals the space beside it:
       the line box plus twice this, less the mark, halved, comes to the same
       0.375rem the gap uses. */
    --collection-token-pad-block: 0.125rem;
    --collection-main-inline-gutter: 1rem;
    /* The channel between the nav and the list. Set to the frame's own
       padding, so the page reads as one margin all the way round rather than
       a wider seam down its middle. */
    --collection-column-gap: 1rem;
    /* What is left of the channel once the list's own inset is taken off,
       less the pixel the sidebar's edge takes. Everything in the nav column
       ends here, so the search field and the items are one width. */
    --collection-nav-item-margin-end: calc(
        var(--collection-column-gap)
        - var(--collection-main-inline-gutter)
        + var(--collection-cell-pad-inline)
        - 1px
    );
    /* Whatever is selected -- the open item's row, the current page in the
       sidebar -- is a grey block with only a breath of green in it, and its
       text is the accent green. The text carries the colour; the block
       stays quiet. */
    --collection-selected-bg: #edf0ee;
    --collection-selected-text: var(--collection-accent);
    --collection-selected-text-muted: #2c7a44;
    /* Two steps darker than the block it sits on (Grey 300 on Grey 100), so
       a token still reads as a token inside a selected row. */
    --collection-selected-token-bg: #d1d5d2;
    /* The greys are close to neutral, with only a trace of the green the
       text colour carries. They were the same hue as the green buttons, which
       tinted every secondary label and rule on the page.

       --collection-muted is body text -- greyed rows are set in it -- so it
       is held at 4.5:1 or better against both the page and a hovered row. The
       value it replaced managed 2.6:1. */
    --collection-muted: #666e69;
    /* One step darker than --collection-muted on the same ramp (600 vs 500),
       so grayed-out rows gain contrast on hover instead of losing it. */
    --collection-muted-hover: #565d58;
    --collection-muted-dark: #434a45;
    /* One step lighter than --collection-muted on the same ramp (400), and
       under the contrast that body text is held to. For a mark that is read
       only if looked for, such as the count of images a row has no room
       for. */
    --collection-faint: #a7aca9;
    --collection-secondary: #313733;
    --collection-spinner: #d1d5d2;
    --collection-status-green-text: #3a5f45;
    --collection-status-red-text: #a82200;
    --collection-status-muted-background: #edf0ee;
    --collection-status-red-background: #f8e8e3;
    --collection-status-green-background: #e4eee7;
    --collection-text: #141a16;
    /* Shadows carry a colour, so they are named here and restated for the
       dark page, where ink on ink reads as nothing. */
    --collection-shadow-menu:
        0 0 0 1px rgb(18 33 21 / 6%),
        0 0.375rem 1.25rem rgb(18 33 21 / 16%);
    --collection-shadow-panel-edge: -1px 0 0 rgb(18 33 21 / 15%);
    --collection-shadow-lifted:
        0 1px 2px rgb(20 26 22 / 8%),
        0 6px 16px rgb(20 26 22 / 14%);
    /* The wordmark deepens into Green 800 when pointed at. */
    --collection-wordmark-hover: #0d411a;
    --collection-token-bg: #f7f8f7;
    --collection-token-bg-on-subtle: #e4e7e6;
    --collection-token-bg-on-strong: #d1d5d2;
    --collection-visible-content-width: calc(100vw - 2rem);
}

/* ---------------------------------------------------------------------------
   The dark page.

   Every colour in this stylesheet comes from a token above, so the dark page
   is those tokens restated and nothing else: no rule is duplicated and no
   selector gains a dark variant. Sizes, spacing and the mark images are not
   repeated here -- the images are painted as masks over currentColor, so they
   follow the text on their own.

   It follows the system rather than a switch of its own. Filament's own dark
   mode stays off (see AdminPanelProvider), so none of its `dark:` variants
   come into play; what Filament draws is covered by the tokens below the same
   way it is on the light page.

   The neutral ramp is the same Grey from the Figma palette, read from the
   other end: the page is 950 where it was white, text is 50 where it was 950,
   and each surface above the page is one step up rather than one step down.
   The greens cannot simply swap ends -- Green 700 on a near-black page is
   barely a colour -- so the accent is lightened to carry 6.5:1 on the page,
   and the primary button keeps a deeper green so white still sits on it.
   --------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        /* Form controls, scrollbars and the like come from the browser. */
        color-scheme: dark;

        /* Green, lightened for a dark ground: 6.5:1 on the page against the
           1.9:1 the light page's accent would have managed. */
        --collection-accent: #34b260;
        --collection-accent-hover: #3dc06d;
        --collection-accent-text: #34b260;
        --collection-accent-soft: rgb(52 178 96 / 14%);
        /* Deep enough that --collection-button-text-on-color still reads on
           it (5.4:1), light enough to part from the page (3.3:1). */
        --collection-accent-strong: #1b7a35;

        --collection-bg: #141a16;
        --collection-panel-bg: #1b221d;
        --collection-field-bg: #202622;
        --collection-hover: #202622;
        --collection-cell-hover: #262d28;
        --collection-border: #313733;

        --collection-text: #f7f8f7;
        --collection-secondary: #e4e7e6;
        /* Hover lifts rather than deepens: on this page more contrast is up
           the ramp, not down it. */
        --collection-muted: #a7aca9;
        --collection-muted-hover: #d1d5d2;
        --collection-muted-dark: #d1d5d2;
        --collection-faint: #666e69;

        --collection-token-bg: #202622;
        --collection-token-bg-on-subtle: #313733;
        --collection-token-bg-on-strong: #434a45;
        --collection-selected-bg: #202622;
        --collection-selected-token-bg: #434a45;
        --collection-selected-text-muted: #7fc496;

        --collection-button-tertiary-bg: #202622;
        --collection-button-tertiary-hover: #313733;
        --collection-button-tertiary-selected-bg: #434a45;
        --collection-button-tertiary-text: #edf0ee;
        --collection-button-tertiary-selected-text: #f7f8f7;
        --collection-button-disabled-bg: #202622;
        --collection-button-disabled-text: #666e69;

        --collection-danger: #e25936;
        --collection-loading-bar: #e2603a;
        --collection-spinner: #434a45;

        --collection-status-green-text: #6fc98a;
        --collection-status-green-background: #18271d;
        --collection-status-red-text: #ef8a70;
        --collection-status-red-background: #2a1813;
        --collection-status-muted-background: #202622;

        /* Ink on ink reads as nothing, so the shadows are blacker and the
           hairline that separates a floating surface does the work. */
        --collection-shadow-menu:
            0 0 0 1px rgb(255 255 255 / 10%),
            0 0.375rem 1.25rem rgb(0 0 0 / 55%);
        --collection-shadow-panel-edge: -1px 0 0 rgb(255 255 255 / 12%);
        --collection-shadow-lifted:
            0 1px 2px rgb(0 0 0 / 40%),
            0 6px 16px rgb(0 0 0 / 50%);

        /* The wordmark lifts toward the accent instead of deepening. */
        --collection-wordmark-hover: #6fc98a;

        /* Filament's own Grey, read from the other end.

           Filament keys its components to this ramp -- a heading takes 950,
           a panel takes 50 -- and publishes it as these variables, built from
           the same Grey given to the panel (see AdminPanelProvider). Its dark
           mode is off, so none of its `dark:` rules apply and every one of
           those components would keep reaching for the light end: a page
           heading at 950 is near-black ink on a near-black page. Turning the
           ramp over here means each of them lands on the right side without a
           rule of its own.

           Stated in the hex the ramp is written in rather than the oklch
           Filament converts it to; either resolves the same. */
        --gray-50: #141a16;
        --gray-100: #202622;
        --gray-200: #313733;
        --gray-300: #434a45;
        --gray-400: #565d58;
        --gray-500: #666e69;
        --gray-600: #a7aca9;
        --gray-700: #d1d5d2;
        --gray-800: #e4e7e6;
        --gray-900: #edf0ee;
        --gray-950: #f7f8f7;
    }

    /* Filament grounds a few surfaces in Tailwind's white rather than in the
       grey ramp, so turning the ramp over does not reach them. --color-white
       cannot simply be turned over with it: Filament's stylesheet uses the
       same variable for the text on a filled button, 139 times over, which
       would put dark labels on the green. These are the surfaces that use it
       as a ground, named instead.

       They sit here, before everything else, so a surface this app styles
       itself still wins on its own later rule. */
    .fi-dropdown-panel,
    .fi-pagination-items,
    .fi-btn:not([class*="fi-color-"]) {
        background-color: var(--collection-bg);
    }

    /* A modal is a surface above the page rather than the page itself, so it
       takes the panel's grey -- the same ground the item panel gives itself,
       which is why that panel needs no exception here even though these
       selectors outrank its own.

       Filament's own selectors are matched for a reason: it sets these three
       grounds at three and four classes deep, and a shorter selector of ours
       would lose to them however late it comes. */
    .fi-modal > .fi-modal-window-ctn > .fi-modal-window,
    .fi-modal.fi-modal-has-sticky-header
        > .fi-modal-window-ctn
        > .fi-modal-window
        > .fi-modal-header,
    .fi-modal.fi-modal-has-sticky-footer
        > .fi-modal-window-ctn
        > .fi-modal-window
        > .fi-modal-footer {
        background-color: var(--collection-panel-bg);
    }

    /* The disc behind a confirmation's warning glyph is the danger ramp's
       shade 100 -- a pale pink, which on the dark modal is the brightest
       thing on screen. It takes the ground and the ink the app gives a red
       status chip instead. Written at Filament's own depth, which is five
       classes, or it would not be reached. */
    .fi-modal
        > .fi-modal-window-ctn
        > .fi-modal-window
        .fi-modal-icon-bg.fi-color-danger {
        background-color: var(--collection-status-red-background);
    }

    .fi-modal
        > .fi-modal-window-ctn
        > .fi-modal-window
        .fi-modal-icon-bg.fi-color-danger
        > .fi-icon {
        color: var(--collection-status-red-text);
    }

    /* The veil behind a modal is Filament's Grey 950 at half strength. That
       end of the ramp is turned over above, so on the dark page it was a
       near-white wash that lightened the list rather than sinking it. Stated
       as black here: it is a shadow over the page, not a shade of the
       palette, and it has to work under both ends of the ramp. */
    .fi-modal > .fi-modal-close-overlay {
        background-color: rgb(0 0 0 / 60%);
    }

    /* The file picker is a field, so on the dark page it takes a field's
       fill rather than the white Filament grounds it in. */
    .fi-fo-file-upload .filepond--root {
        background-color: var(--collection-field-bg);
    }

    /* A tick box and a radio are white boxes with a hairline; on the dark
       page they take the fill every other field has, so an empty one reads
       as a place to click rather than a bright chip. The ticked state is a
       filled green and is left alone. */
    .fi-checkbox-input:not(:checked),
    .fi-radio-input:not(:checked) {
        background-color: var(--collection-field-bg);
    }

    /* Filament marks a coloured link with the shade for a light ground and a
       `dark:` class holding the lighter one -- see the danger link below.
       "Select All" above a column list is the primary one. */
    .fi-link.fi-color-primary,
    .fi-link.fi-color-primary .fi-link-label {
        color: var(--collection-accent);
    }

    /* A floating panel needs its own edge once the page is dark; Filament's
       own ring is drawn for a light one. */
    .fi-dropdown-panel,
    .fi-modal:not(.fi-modal-slide-over) > .fi-modal-window-ctn > .fi-modal-window {
        box-shadow: var(--collection-shadow-menu);
    }

    /* Filament marks a coloured link with the shade for a light ground and a
       `dark:` class holding the lighter one -- it knows the right answer, but
       that class only comes into play under Filament's own dark mode, which
       is off here. The one such link in the app is set from this palette
       rather than turning the whole danger ramp over: Filament reads shade
       600 both as text on a light ground and as the fill behind a button's
       white label, so turning it over would mend the link and spoil the
       button. */
    .fi-link.fi-color-danger,
    .fi-link.fi-color-danger .fi-link-label {
        color: var(--collection-danger);
    }
}


html,
body,
.fi-body,
.fi-layout,
.fi-main-ctn,
.fi-main,
.fi-sidebar,
.fi-sidebar-header,
.fi-sidebar-nav,
.fi-topbar,
.fi-topbar-ctn {
    background: var(--collection-bg);
}

body {
    font-size: 16px;
    font-weight: 400;
}

html.fi,
.fi-body,
.fi-layout {
    height: 100dvh;
    overflow: hidden;
}

.fi-layout > .fi-main-ctn {
    display: flex !important;
    height: 100dvh;
    opacity: 1 !important;
    overflow: auto;
}

@media (min-width: 1024px) {
    :root {
        --collection-main-inline-gutter: 2.75rem;
        --collection-column-gap: 2.75rem;
        --collection-visible-content-width: calc(
            100vw - var(--sidebar-width) - var(--collection-main-inline-gutter) * 2
        );
    }

    .fi-layout {
        padding-inline-start: var(--sidebar-width);
    }

    .fi-main {
        padding-inline: var(--collection-main-inline-gutter);
    }

    .fi-main-sidebar {
        position: fixed !important;
        inset-block: 0;
        inset-inline-start: 0;
        width: var(--sidebar-width) !important;
        contain: layout paint style;
        isolation: isolate;
        transform: none !important;
        transition: none !important;
    }

    .fi-layout > .fi-main-ctn {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --collection-main-inline-gutter: 1.5rem;
        --collection-column-gap: 1.5rem;
        --collection-visible-content-width: calc(100vw - var(--collection-main-inline-gutter) * 2);
    }
}

.fi-body :where(a, button, input, select, textarea, label, p, span, div, th, td, h1, h2, h3, h4, h5, h6) {
    font-size: 16px;
}

/* The page title and the wordmark beside it share one size, so they sit on
   one baseline across the sidebar edge. 48 on 52: three times the 16px
   everything else is set in, which is where the page gets its hierarchy. */
.fi-sidebar .fi-logo,
.fi-header-heading {
    position: relative;
    /* Graphik's capitals sit a little high in their line box, so centring
       the box leaves them 1.5px above centre. This puts them on it. */
    top: 0.1125rem;
    font-size: 48px !important;
    font-weight: 500;
    line-height: 3.25rem;
}

/* A 48px capital starts a few pixels inside its own box, which left the
   title's ink visibly to the right of the column of text under it. This
   brings the two edges together for a straight-sided first letter. */
.fi-header-heading {
    margin-inline-start: -0.15rem;
}

/* Set by the grid script on a title that shares its line with the floating
   toolbar, along with the width that keeps it clear. See fitPageTitle(). */
.fi-header-heading[data-collection-title-fit] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Filament indents the logo to clear an icon mark we do not use. Dropping it
   leaves the wordmark flush with the nav items below -- and then a little
   further: at 40px the C carries 1.8px of space on its left that the 16px
   labels under it do not, so its ink sat visibly inside theirs. */
.fi-sidebar .fi-logo {
    margin-inline-start: -0.1125rem;
}

/* "Section / Record" stays on one line. A long record name is cut with an
   ellipsis (its tooltip has the rest); the section and the slash never are. */
.collection-section-record-heading {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.3em;
}

.collection-section-record-heading-link,
.collection-section-record-heading-separator {
    flex: none;
}

.fi-header-heading .collection-section-record-heading,
.fi-header-heading .collection-section-record-heading > * {
    font-size: inherit !important;
    line-height: inherit;
}

.collection-section-record-heading-link {
    color: inherit;
    text-decoration: none;
}

.collection-section-record-heading-link:hover,
.collection-section-record-heading-link:focus-visible {
    color: var(--collection-muted-dark);
    outline: none;
}

.collection-section-record-heading-separator {
    color: var(--collection-muted);
    font-weight: 400;
}

.collection-section-record-heading-record {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* The sidebar has no edge of its own while the page beside it is at rest.
   The rule appears once the table has been scrolled sideways, when rows are
   passing underneath it and there is something to divide. The grid script
   sets the class. */
.fi-sidebar {
    border-inline-end: 1px solid transparent;
    box-shadow: none;
    transition: border-color 0.15s ease-out;
}

.collection-main-scrolled-x .fi-sidebar {
    border-inline-end-color: var(--collection-border);
}

.fi-sidebar .fi-sidebar-header {
    padding-inline: var(--collection-main-inline-gutter);
}

.fi-sidebar-header {
    box-shadow: none;
    min-height: var(--collection-header-height);
    padding-top: var(--collection-header-top-inset);
    align-items: center;
}

.fi-main,
.fi-page {
    min-height: 100dvh;
}

.fi-page-header-main-ctn {
    padding-block: 0;
}

.fi-page-header-main-ctn > .fi-header {
    position: relative;
    z-index: 11;
    width: 100%;
    margin-inline-start: 0;
    border-bottom: 1px solid var(--collection-border);
    background: var(--collection-bg);
    padding-inline:
        calc(var(--collection-main-inline-gutter) + 0.75rem)
        var(--collection-main-inline-gutter);
}

.fi-page:not(.fi-resource-list-records-page):not(.collection-items-page)
    > .fi-page-header-main-ctn
    > .fi-header {
    padding-inline: 0;
}

/* No rule under the title bar on a record's own page: the name below it is
   the page's heading, and a line drawn between the two reads as a division
   where there is none. */
.fi-resource-view-record-page > .fi-page-header-main-ctn > .fi-header,
.fi-resource-edit-record-page > .fi-page-header-main-ctn > .fi-header,
.fi-resource-create-record-page > .fi-page-header-main-ctn > .fi-header {
    border-bottom: 0;
}

.fi-resource-list-records-page > .fi-page-header-main-ctn > .fi-header {
    border-bottom: 0;
    padding-inline-start: var(--collection-main-inline-gutter);
    pointer-events: none;
}

.fi-resource-list-records-page > .fi-page-header-main-ctn > .fi-header > * {
    pointer-events: auto;
}

.fi-header {
    min-height: var(--collection-header-height);
    padding-top: var(--collection-header-top-inset);
    align-items: center;
}

.fi-resource-list-records-page {
    position: relative;
}

.fi-resource-list-records-page > .fi-page-header-main-ctn {
    gap: 0;
}

.fi-resource-list-records-page .fi-ta-header-toolbar {
    position: absolute;
    z-index: 13;
    /* Centred in the header band above, whatever its height. */
    top: calc((var(--collection-header-height) - var(--collection-header-top-inset) + var(--collection-control-height)) / -2);
    right: calc(
        var(--collection-main-inline-gutter)
        + var(--collection-header-actions-width, 6rem)
        + var(--collection-toolbar-clearance)
    );
    width: auto;
    flex-wrap: nowrap;
    gap: 1rem;
    border: 0;
    padding: 0;
}

.fi-resource-items.fi-resource-list-records-page .fi-ta-header-toolbar {
    right: calc(
        var(--collection-main-inline-gutter)
        + var(--collection-header-actions-width, 6rem)
        + var(--collection-toolbar-clearance)
    );
}

.fi-page-header-main-ctn > .fi-header,
.fi-resource-list-records-page .fi-ta-header-toolbar,
.fi-resource-list-records-page .fi-ta-filter-indicators,
.fi-resource-list-records-page .fi-ta-main > .fi-pagination,
.collection-grid-table .fi-pagination {
    transition: none !important;
}

.fi-resource-list-records-page .fi-ta-header-toolbar > .fi-ta-actions:empty {
    display: none;
}

.fi-resource-list-records-page
    .fi-ta-header-toolbar
    > :last-child
    .fi-ta-filters-dropdown,
.collection-items-page
    .fi-ta-header-toolbar
    > :last-child
    .fi-ta-filters-dropdown {
    order: 1;
}

.fi-resource-list-records-page
    .fi-ta-header-toolbar
    > :last-child
    :is(.fi-ta-col-manager-dropdown, .fi-ta-col-manager-modal),
.collection-items-page
    .fi-ta-header-toolbar
    > :last-child
    :is(.fi-ta-col-manager-dropdown, .fi-ta-col-manager-modal) {
    order: 2;
}

.fi-resource-list-records-page
    .fi-ta-header-toolbar
    > :last-child
    .fi-ta-search-field,
.collection-items-page
    .fi-ta-header-toolbar
    > :last-child
    .fi-ta-search-field {
    order: 3;
}

/* Search sits collapsed as a grey magnifier button and opens into a field on
   click, staying open while it holds a query.

   The width is animated on the input itself. The field and its wrapper are
   flex items that size to their content, and a width on either -- even
   !important -- is ignored; the input is the one element here whose width
   actually drives the layout. */
.fi-resource-list-records-page .fi-ta-search-field,
.collection-items-page .fi-ta-search-field {
    width: auto;
    flex: 0 0 auto;
    cursor: pointer;
}

.fi-ta-search-field .fi-input-wrp {
    height: var(--collection-control-height);
    /* Never narrower than the icon buttons beside it. Left to size from its
       content, Safari collapsed it and clipped the magnifier. */
    min-width: var(--collection-control-height);
    overflow: hidden;
    border: 0;
    border-radius: var(--collection-control-radius);
    background: var(--collection-button-tertiary-bg);
    box-shadow: none;
    outline: 0;
    transition:
        background 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
}

/* The prefix was padded 12px/8px, so the magnifier could not sit centred in
   the collapsed button, and it inherited a pale placeholder colour rather than
   matching the icon buttons beside it. */
.fi-ta-search-field .fi-input-wrp-prefix {
    justify-content: center;
    padding: 0;
    flex: 0 0 var(--collection-control-height);
    width: var(--collection-control-height);
    min-width: var(--collection-control-height);
    color: var(--collection-button-tertiary-text);
}

.fi-ta-search-field .fi-input-wrp-prefix svg,
.fi-ta-search-field:focus-within .fi-input-wrp-prefix svg {
    color: var(--collection-button-tertiary-text);
}

.fi-ta-search-field:hover .fi-input-wrp {
    background: var(--collection-button-tertiary-hover);
}

.fi-ta-search-field:focus-within .fi-input-wrp,
.fi-ta-search-field.collection-search-open .fi-input-wrp {
    box-shadow: inset 0 0 0 2px var(--collection-accent);
}

.fi-ta-search-field .fi-input {
    width: 0;
    min-width: 0;
    padding-inline: 0;
    background: transparent;
    opacity: 0;
    transition:
        width 0.2s ease-in-out,
        padding 0.2s ease-in-out,
        opacity 0.2s ease-in-out;
}

.fi-ta-search-field:focus-within .fi-input,
.fi-ta-search-field.collection-search-open .fi-input {
    width: 11.5rem;
    padding-inline-end: 0.75rem;
    opacity: 1;
}

/* The input is 2.25rem tall inside a 2.5rem wrapper that was not centring it,
   which left the text sitting a pixel above the magnifier. */
.fi-ta-search-field .fi-input-wrp,
.fi-sidebar .fi-global-search-ctn .fi-input-wrp {
    align-items: center;
}

.fi-resource-list-records-page .fi-page-content {
    gap: 0;
}

.fi-resource-list-records-page .fi-ta-ctn {
    border-top: 0;
}

.fi-resource-list-records-page .fi-ta-filter-indicators {
    min-height: var(--collection-row-height);
    align-items: center;
    width: calc(
        var(--collection-visible-content-width) +
        var(--collection-main-inline-gutter) +
        var(--collection-main-inline-gutter)
    );
    margin-inline-start: calc(0rem - var(--collection-main-inline-gutter));
    border: 0;
    /* The page's own white rather than a grey band. Not transparent: the bar
       is fixed on a wide screen, and the rows scroll underneath it. */
    background: var(--collection-bg);
    /* Set against the indicator's own height so the bar comes to exactly one
       row: 1.75rem of badge between two of these. */
    padding-block: 0.375rem;
    padding-inline: var(--collection-main-inline-gutter);
}

.fi-resource-list-records-page .fi-ta-filter-indicators > div,
.fi-resource-list-records-page
    .fi-ta-filter-indicators-badges-ctn {
    align-items: center;
}

.collection-items-page {
    position: relative;
}

.collection-items-page > .fi-page-header-main-ctn {
    gap: 0;
}

.collection-items-page > .fi-page-header-main-ctn > .fi-header {
    border-bottom: 0;
    padding-inline-start: var(--collection-main-inline-gutter);
    pointer-events: none;
}

.collection-items-page > .fi-page-header-main-ctn > .fi-header > * {
    pointer-events: auto;
}

.collection-items-page .fi-page-content {
    gap: 0;
}

.collection-items-page .fi-ta-ctn {
    border-top: 0;
}

.collection-items-page .fi-ta-header-toolbar {
    position: absolute;
    z-index: 13;
    /* Centred in the header band above, whatever its height. */
    top: calc((var(--collection-header-height) - var(--collection-header-top-inset) + var(--collection-control-height)) / -2);
    right: calc(
        var(--collection-main-inline-gutter)
        + var(--collection-header-actions-width, 6rem)
        + var(--collection-toolbar-clearance)
    );
    width: auto;
    flex-wrap: nowrap;
    gap: 1rem;
    border: 0;
    padding: 0;
}

.collection-items-page .fi-ta-header-toolbar > .fi-ta-actions {
    flex-wrap: nowrap;
}

.fi-resource-list-records-page
    .fi-ta-header-toolbar
    > :last-child,
.collection-items-page
    .fi-ta-header-toolbar
    > :last-child {
    column-gap: 1rem;
}

/* Shown on every list, not just collection pages. The trailing margin doubles
   the gap on that side, setting the count apart from the controls. */
.collection-items-count {
    margin-inline-end: var(--collection-toolbar-gap);
    color: var(--collection-text);
    font-weight: 400;
    opacity: 1;
    pointer-events: none;
}

.collection-items-page .fi-ta-filter-indicators {
    min-height: var(--collection-row-height);
    align-items: center;
    width: calc(
        var(--collection-visible-content-width) +
        var(--collection-main-inline-gutter) +
        var(--collection-main-inline-gutter)
    );
    margin-inline-start: calc(0rem - var(--collection-main-inline-gutter));
    border: 0;
    /* The page's own white rather than a grey band. Not transparent: the bar
       is fixed on a wide screen, and the rows scroll underneath it. */
    background: var(--collection-bg);
    /* Set against the indicator's own height so the bar comes to exactly one
       row: 1.75rem of badge between two of these. */
    padding-block: 0.375rem;
    padding-inline: var(--collection-main-inline-gutter);
}

.collection-items-page .fi-ta-filter-indicators > div,
.collection-items-page .fi-ta-filter-indicators-badges-ctn {
    align-items: center;
}

.fi-page-sub-navigation-tabs {
    align-self: flex-start;
    gap: 0;
    overflow: hidden;
    margin-inline: 0;
    border: 0;
    border-radius: var(--collection-control-radius);
    background: var(--collection-button-tertiary-bg);
    box-shadow: none;
    padding: 0;
}

.fi-page-sub-navigation-tabs .fi-tabs-item {
    min-height: var(--collection-control-height);
    border: 0;
    border-radius: 0;
    background: var(--collection-button-tertiary-bg);
    color: var(--collection-text);
    font-weight: 400;
    padding: 0.5rem 0.75rem;
}

.fi-page-sub-navigation-tabs .fi-tabs-item + .fi-tabs-item {
    border-inline-start: 1px solid var(--collection-border);
}

.fi-page-sub-navigation-tabs .fi-tabs-item:hover,
.fi-page-sub-navigation-tabs .fi-tabs-item:focus-visible {
    background: var(--collection-button-tertiary-hover);
}

.fi-page-sub-navigation-tabs .fi-tabs-item.fi-active {
    background: var(--collection-button-tertiary-selected-bg);
}

.fi-page-sub-navigation-tabs .fi-tabs-item .fi-tabs-item-label {
    color: inherit;
    font-weight: inherit;
}

.fi-page-sub-navigation-tabs .fi-tabs-item.fi-active .fi-tabs-item-label {
    color: var(--collection-text);
    font-weight: 500;
}

.fi-ta-filter-indicators-label {
    display: none;
}

/* The button that clears every filter is an icon button, which comes at the
   full height of a control and alone made the bar taller than a row. Sized to
   the indicators it sits beside. Carries .fi-body only to outrank this
   stylesheet's own .fi-body .fi-icon-btn, which sits further down the file. */
.fi-body .fi-ta-filter-indicators .fi-icon-btn {
    width: 1.75rem;
    height: 1.75rem;
    min-height: 1.75rem;
}

.fi-ta-filter-indicators .fi-badge {
    min-height: 1.75rem;
    align-items: center;
    gap: 0.125rem;
    border: 0;
    background: var(--collection-button-tertiary-hover);
    box-shadow: none;
    color: var(--collection-button-tertiary-text);
    font-weight: 400;
    padding: 0.25rem 0.25rem 0.25rem 0.625rem;
}

.fi-ta-filter-indicators .fi-badge-label-ctn {
    align-self: center;
    line-height: 1.25rem;
    transform: translateY(1px);
}

.fi-ta-filter-indicators .fi-badge-label {
    color: inherit;
    font-weight: 400;
    line-height: 1.25rem;
}

/* Search is the first item in the nav: at rest it is the word, set like the
   items under it, with no box and no icon. Clicked, it becomes a field. */
.fi-sidebar .fi-global-search-ctn {
    /* Set like the table's column headings opposite: the same step down from
       the band that the headings take from the page title, so the word sits
       on their line and the first item below it sits on the first row's.
       Ends where the items end, so the column is one width. */
    margin: var(--collection-grid-sticky-offset) var(--collection-nav-item-margin-end) 0
        calc(var(--collection-main-inline-gutter) - 0.75rem);
}

.fi-sidebar .fi-global-search-ctn .fi-input-wrp {
    height: var(--collection-control-height);
    border-color: transparent;
    background: transparent;
    cursor: pointer;
}

.fi-sidebar .fi-global-search-ctn .fi-input-wrp:hover {
    background: var(--collection-token-bg);
}

.fi-sidebar .fi-global-search-ctn .fi-input-wrp:focus-within {
    border-color: var(--collection-accent-text);
    background: var(--collection-field-bg);
    cursor: text;
}

.fi-sidebar .fi-global-search-ctn .fi-input-wrp-prefix {
    display: none;
}

.fi-sidebar .fi-global-search-ctn .fi-input {
    /* 7px over 5px sets "Search" at the height of the nav labels below it. */
    padding: 0.4375rem calc(0.75rem - 1px) 0.3125rem;
}

.fi-sidebar .fi-global-search-ctn .fi-input::placeholder {
    color: var(--collection-text);
    font-weight: 400;
    opacity: 1;
}

.fi-sidebar .fi-global-search-ctn .fi-input:focus::placeholder {
    color: var(--collection-muted);
    font-weight: 400;
}

/* ---- Search results ---------------------------------------------------
   Drawn as the token selector's menu is (see .collection-token-select-menu):
   4px of padding round the entries and 4px proud of the field on each side,
   so the entries, and the highlight on the active one, are exactly as wide
   as the field whatever they hold. */
.fi-sidebar .fi-global-search {
    position: relative;
}

.collection-search-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    inset-inline: -0.25rem;
    /* Ten two-line results are taller than a short window. */
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
    padding: 0.25rem;
    border-radius: var(--collection-control-radius);
    background: var(--collection-bg);
    box-shadow: var(--collection-shadow-menu);
}

/* One line of text makes an entry the height of a control, like the token
   menu's; a second line grows it. */
.collection-search-option {
    display: flex;
    min-height: var(--collection-control-height);
    align-items: center;
    border-radius: var(--collection-token-radius);
    /* Text starts where typed text starts in the field above. */
    padding: 0.5rem 0.75rem 0.375rem;
    color: var(--collection-text);
    line-height: 1.375rem;
    text-decoration: none;
    cursor: pointer;
}

.collection-search-option-active {
    background: var(--collection-token-bg-on-strong);
}

/* Two lines at most, then an ellipsis. */
.collection-search-option-text {
    display: -webkit-box;
    overflow: hidden;
    min-width: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}

/* An item's subtitle -- or, for anything else, what kind of thing it is --
   runs on from the name, set lighter, as the subtitle does in the grids. */
.collection-search-option-detail {
    color: var(--collection-muted);
}

.collection-search-empty {
    display: flex;
    min-height: var(--collection-control-height);
    align-items: center;
    padding: 0.125rem 0.75rem 0;
    color: var(--collection-muted);
}

.fi-sidebar-nav {
    gap: 0;
    padding: 0 0 1rem;
}

.fi-sidebar-nav-groups {
    margin-inline: 0;
    gap: 0;
}

.fi-sidebar-group-items {
    gap: 0;
}

/* The collections hang off All Items in a sub-group, and each level of that
   nesting carries a gap of its own. Left alone they kept Filament's four
   pixels while everything below them sat on one. */
.fi-sidebar-nav :is(.fi-sidebar-sub-group-items, .fi-sidebar-group) {
    gap: 0;
}

.fi-sidebar-item {
    width: 100%;
}

/* A nav item is the same shape as a row in the list: its text sits on the
   shared gutter, and its fill -- on hover, or when it is the current page --
   is a rounded block that starts 0.75rem outside the text and stops short of
   the sidebar's edges. */
.fi-sidebar .fi-sidebar-item-btn,
.fi-sidebar .fi-sidebar-sub-group-items .fi-sidebar-item-btn {
    width: auto;
    justify-content: flex-start;
    /* A row of the list, exactly: a row's rule is drawn inside its own
       height and rows sit against each other, so an item is the full height
       and the items sit against each other too. Held a pixel short with a
       pixel between them, the two columns kept step but every block in the
       nav was a pixel shallower than the one beside it. */
    min-height: var(--collection-row-height);
    margin-inline:
        calc(var(--collection-main-inline-gutter) - 0.75rem)
        var(--collection-nav-item-margin-end);
    border-radius: var(--collection-control-radius);
    /* 2px above and none below: see .fi-btn, which does the same. */
    padding: 0.125rem 0.75rem 0;
}

/* A rule between the collections and the pages that manage the lists behind
   them. It hangs off whichever item follows the one holding the collections,
   and is inset to the nav items' text. */
.fi-sidebar-group-items > .fi-sidebar-item[data-always-show-children] + .fi-sidebar-item {
    position: relative;
    /* A separator stands in a row of its own, so what follows it keeps the
       list's step: half a row above the rule and half below. The rule is
       drawn by ::before, out of the flow, so it costs no height of its
       own and falls in the middle of that row. */
    margin-top: calc(var(--collection-row-height) / 2);
    padding-top: calc(var(--collection-row-height) / 2);
}

.fi-sidebar-group-items > .fi-sidebar-item[data-always-show-children] + .fi-sidebar-item::before {
    position: absolute;
    top: 0;
    /* As wide as an item's text: each end is that item's own edge brought in
       by its padding. The two ends are not the same measurement any more --
       the trailing one changed with the channel beside the list -- so a rule
       inset evenly fell short on that side. */
    inset-inline:
        var(--collection-main-inline-gutter)
        calc(var(--collection-nav-item-margin-end) + 0.75rem);
    border-top: 1px solid var(--collection-border);
    content: "";
}

.fi-sidebar .fi-sidebar-item-grouped-border {
    display: none;
}

.fi-sidebar
    .fi-sidebar-group-items
    > .fi-sidebar-item
    > .fi-sidebar-item-btn {
    color: var(--collection-text);
    font-weight: 500;
}

.fi-sidebar .fi-sidebar-sub-group-items .fi-sidebar-item-btn {
    color: var(--collection-muted-dark);
}

.fi-sidebar
    .fi-sidebar-sub-group-items
    .fi-sidebar-item.fi-active
    > .fi-sidebar-item-btn {
    color: var(--collection-selected-text);
}

.fi-sidebar-nav .fi-sidebar-item-btn > .fi-icon {
    display: none;
}

.fi-sidebar-footer {
    margin: 0;
    height: var(--collection-footer-height);
    align-content: center;
    border-top: 1px solid var(--collection-border);
    padding: 0.75rem calc(var(--collection-main-inline-gutter) - 0.5rem);
}

.fi-sidebar .fi-user-menu-trigger {
    justify-content: flex-start;
    border-radius: 0.25rem;
    padding: 0.5rem;
}

.fi-sidebar .fi-user-avatar {
    display: none;
}

.fi-btn,
.fi-icon-btn,
.fi-input-wrp,
.fi-dropdown-panel {
    border-radius: var(--collection-control-radius);
}

.fi-body .fi-btn,
.fi-body .fi-icon-btn,
.fi-body .fi-input-wrp {
    min-height: var(--collection-control-height);
}

/* A button's label is centred by its line box, which leaves Graphik's
   capitals a pixel high. Two pixels of padding above and none below moves
   the centre down by one, to where a field and a row set their text. */
.fi-body .fi-btn {
    padding-block: 0.125rem 0;
}

.fi-body .fi-icon-btn {
    width: var(--collection-control-height);
    height: var(--collection-control-height);
    margin: 0;
}

.fi-dropdown-panel {
    padding: 0.5rem;
}

.fi-ta-filters-dropdown .fi-ta-filters {
    padding: 1rem;
}

.fi-ta-filters-dropdown
    .fi-ta-filters-actions-ctn
    .fi-btn.fi-color-primary {
    background: var(--collection-button-secondary-bg);
    color: var(--collection-button-text-on-color);
}

.fi-ta-filters-dropdown
    .fi-ta-filters-actions-ctn
    .fi-btn.fi-color-primary:hover:not(:disabled, [aria-disabled="true"]) {
    background: var(--collection-button-secondary-hover);
    color: var(--collection-button-text-on-color);
}

.fi-body .fi-btn.fi-color-primary {
    background: var(--collection-button-primary-bg);
    color: var(--collection-button-text-on-color);
}

.fi-body .fi-btn.fi-color-primary:hover:not(:disabled, [aria-disabled="true"]) {
    background: var(--collection-button-primary-hover);
    color: var(--collection-button-text-on-color);
}

/* Filament's own danger button here was a pale red with dark text, which
   read as disabled beside the green. */
.fi-body .fi-btn.fi-color-danger {
    background: var(--collection-button-danger-bg);
    color: var(--collection-button-text-on-color);
}

.fi-body .fi-btn.fi-color-danger:hover:not(:disabled, [aria-disabled="true"]) {
    background: var(--collection-button-danger-hover);
    color: var(--collection-button-text-on-color);
}

.fi-body .fi-btn.collection-button-secondary {
    background: var(--collection-button-secondary-bg);
    color: var(--collection-button-text-on-color);
}

.fi-body
    .fi-btn.collection-button-secondary:hover:not(
        :disabled,
        [aria-disabled="true"]
    ) {
    background: var(--collection-button-secondary-hover);
    color: var(--collection-button-text-on-color);
}

.fi-body .fi-btn.fi-color-gray,
.fi-body .fi-btn.fi-outlined,
.fi-body .fi-btn.collection-button-tertiary,
.fi-body .fi-icon-btn.collection-button-tertiary,
.fi-body .fi-ta-header-toolbar .fi-icon-btn {
    border: 0;
    background: var(--collection-button-tertiary-bg);
    box-shadow: none;
    color: var(--collection-button-tertiary-text);
}

.fi-body .fi-btn.fi-color-gray:hover:not(:disabled, [aria-disabled="true"]),
.fi-body .fi-btn.fi-outlined:hover:not(:disabled, [aria-disabled="true"]),
.fi-body
    .fi-btn.collection-button-tertiary:hover:not(
        :disabled,
        [aria-disabled="true"]
    ),
.fi-body
    .fi-icon-btn.collection-button-tertiary:hover:not(
        :disabled,
        [aria-disabled="true"]
    ),
.fi-body
    .fi-ta-header-toolbar
    .fi-icon-btn:hover:not(:disabled, [aria-disabled="true"]) {
    background: var(--collection-button-tertiary-hover);
    color: var(--collection-button-tertiary-selected-text);
}

.fi-body .fi-btn.fi-color-gray[aria-expanded="true"],
.fi-body .fi-btn.fi-outlined[aria-expanded="true"],
.fi-body .fi-btn.collection-button-tertiary[aria-expanded="true"],
.fi-body .fi-icon-btn.collection-button-tertiary[aria-expanded="true"],
.fi-body .fi-ta-header-toolbar .fi-icon-btn[aria-expanded="true"] {
    background: var(--collection-button-tertiary-selected-bg);
    color: var(--collection-button-tertiary-selected-text);
}

/* The toolbar's controls are ghost buttons: no fill until pointed at, opened
   or in use, so the header band reads as a title and a few quiet glyphs. The
   create button beside them keeps its fill -- it is the one action there. A
   filter button showing a count keeps its fill too, since filters are on.
   The filter trigger is named a second time, by its full path, because the
   rule below fills it by that path and would otherwise win. */
.fi-body
    .fi-ta-header-toolbar
    .fi-icon-btn:not(:hover, :focus-visible, [aria-expanded="true"], .collection-filter-button-has-count),
.fi-body
    .fi-ta-header-toolbar
    .fi-ta-filters-dropdown
    > .fi-dropdown-trigger
    > .fi-icon-btn:not(:hover, :focus-visible, [aria-expanded="true"], .collection-filter-button-has-count),
.fi-ta-header-toolbar
    .fi-ta-search-field:not(:hover, :focus-within, .collection-search-open)
    .fi-input-wrp {
    background: transparent;
}

.fi-body
    .fi-ta-filters-dropdown
    > .fi-dropdown-trigger
    > .fi-icon-btn,
.fi-body .fi-pagination-item-btn,
.fi-body
    .fi-pagination-records-per-page-select
    .fi-input-wrp {
    background: var(--collection-button-tertiary-bg);
    color: var(--collection-button-tertiary-text);
}

.fi-body
    .fi-ta-filters-dropdown
    > .fi-dropdown-trigger
    > .fi-icon-btn:hover:not(:disabled),
.fi-body
    .fi-pagination-item:not(.fi-active, .fi-disabled)
    .fi-pagination-item-btn:hover,
.fi-body
    .fi-pagination-records-per-page-select
    .fi-input-wrp:hover {
    background: var(--collection-button-tertiary-hover);
    color: var(--collection-button-tertiary-selected-text);
}

.fi-body
    .fi-ta-filters-dropdown
    > .fi-dropdown-trigger
    > .fi-icon-btn[aria-expanded="true"],
.fi-body .fi-pagination-item.fi-active .fi-pagination-item-btn,
.fi-body
    .fi-pagination-records-per-page-select
    .fi-input-wrp:focus-within {
    background: var(--collection-button-tertiary-selected-bg);
    color: var(--collection-button-tertiary-selected-text);
}

.fi-body
    .fi-ta-filters-dropdown
    > .fi-dropdown-trigger
    > .fi-icon-btn
    .fi-badge {
    background: transparent;
    color: inherit;
}

.fi-body
    .fi-ta-filters-dropdown
    > .fi-dropdown-trigger
    > .fi-icon-btn
    .fi-icon-btn-badge-ctn {
    top: 50%;
    transform: none;
}

.fi-body
    .fi-pagination-records-per-page-select
    .fi-input-wrp {
    border-color: transparent;
}

.fi-body
    .fi-pagination-records-per-page-select
    .fi-select-input {
    /* The colour only: the shorthand also cleared the chevron, which a
       select draws as its background image. */
    background-color: transparent;
    color: inherit;
}

.fi-body :is(.fi-btn, .fi-icon-btn):is(:disabled, [aria-disabled="true"]),
.fi-body .fi-pagination-item.fi-disabled .fi-pagination-item-btn {
    background: var(--collection-button-disabled-bg);
    color: var(--collection-button-disabled-text);
    cursor: not-allowed;
    opacity: 1;
}

.fi-input-wrp,
.fi-input-wrp:focus-within,
.fi-input {
    box-shadow: none !important;
}

/* Fields are a flat, very light grey block with no outline, and gain a
   border when focused. The border is always there, transparent at rest, so
   focusing a field does not move its text by a pixel. */
.fi-input-wrp {
    border: 1px solid transparent;
    background: var(--collection-field-bg);
}

/* The focus ring is two pixels: the field's own border, plus one more drawn
   just inside it as an outline, so nothing moves. (Shadows on fields are
   switched off wholesale above, which is why this is not a box-shadow.) */
.fi-input-wrp:focus-within {
    border-color: var(--collection-accent-text);
    outline: 1px solid var(--collection-accent-text);
    outline-offset: -2px;
}

/* A ticked box is the accent itself. Filament would use a lighter step of
   the palette it derives from it. */
.fi-body .fi-checkbox-input:checked,
.fi-body .fi-checkbox-input:indeterminate {
    background-color: var(--collection-accent-strong);
}

/* A switch that is on is the same solid fill as a ticked box and the
   main button: one green for everything that is filled in at rest. */
.fi-body button.fi-toggle.fi-toggle-on {
    background-color: var(--collection-accent-strong);
}

.fi-input-wrp :is(.fi-input, .fi-select-input, textarea) {
    background-color: transparent;
}

/* Text is centred in a field by its capitals, not by its line box. Graphik's
   line box sits high around its capitals, so equal padding left 12.6px above
   them and 16px below. 8px over 4px puts 14.6px above and 14px below. */
.fi-input-wrp :is(input.fi-input, textarea, .fi-select-input-btn) {
    padding-block: 0.5rem 0.25rem;
}

/* A chosen value sits on the field's grey, so it takes the token's next
   step up, as a token does on a hovered row. */
.fi-input-wrp .fi-badge:has(> .fi-badge-delete-btn),
.fi-input-wrp .fi-badge:has(> .fi-select-input-badge-remove) {
    background: var(--collection-token-bg-on-subtle);
}

/* ---- The token selector --------------------------------------------- */

.collection-token-select {
    position: relative;
}

/* Tokens and the text being typed share the field, wrapping onto more lines
   as tokens are added. The tokens start 6px in and the typing 6px further,
   which puts typed text where the label above starts. */
.collection-token-select-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3125rem 0.375rem;
    cursor: text;
}

/* Two classes, to outrank the rule that pins a grid token's contents to the
   top of the token. Here the remove mark is centred on the label, not
   sitting above it. */
.collection-token-select .collection-token-select-token {
    align-items: center;
    background: var(--collection-token-bg-on-subtle);
}

/* In the edit panels the fields are white, like a row in the table, so a
   token in one takes the same resting grey a token in the table has. */
.collection-item-panel .collection-token-select .collection-token-select-token,
.collection-item-panel .fi-input-wrp .fi-badge:has(> .fi-badge-delete-btn),
.collection-item-panel .fi-input-wrp .fi-badge:has(> .fi-select-input-badge-remove) {
    background: var(--collection-token-bg);
}

/* The token the keyboard is on: Backspace or Delete will remove it. Filled
   in the green of a primary button so it cannot be missed.

   Named twice on purpose. The rule above that gives a token in an edit
   panel the resting grey of a table token carries a third class, and so
   outranked a selected token written with two -- which left the white
   label standing on the resting grey, a contrast of 1.07:1. */
.collection-token-select .collection-token-select-token.collection-token-select-token-selected {
    background: var(--collection-button-secondary-bg);
    color: var(--collection-button-text-on-color);
}

.collection-token-select-token-selected .collection-token-select-remove,
.collection-token-select-token-selected .collection-token-select-remove:hover {
    color: var(--collection-button-text-on-color);
}

.collection-token-select-remove {
    display: inline-flex;
    width: var(--collection-token-mark);
    height: var(--collection-token-mark);
    flex: none;
    /* The token's centre is a pixel above the middle of its lowercase
       letters, which is where the mark reads as level with the label. */
    margin-top: 1px;
    color: var(--collection-muted-dark);
}

.collection-token-select-remove:hover,
.collection-token-select-remove:focus-visible {
    color: var(--collection-danger);
    outline: none;
}

.collection-token-select-remove svg {
    width: 100%;
    height: 100%;
}

.fi-body .collection-token-select-input {
    min-width: 4rem;
    height: 1.75rem;
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.125rem 0.375rem 0;
    line-height: 1.5rem;
    outline: 0;
    box-shadow: none;
}

/* The menu has 4px of padding round its entries, and hangs 4px proud of the
   field on each side to make room for it -- so the entries themselves, and
   the highlight on the active one, line up with the field's own edges. */
.collection-token-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    inset-inline: -0.25rem;
    overflow: hidden;
    padding: 0.25rem;
    border-radius: var(--collection-control-radius);
    background: var(--collection-bg);
    box-shadow: var(--collection-shadow-menu);
}

.collection-token-select-option {
    display: flex;
    width: 100%;
    height: var(--collection-control-height);
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--collection-token-radius);
    /* Text starts where typed text starts in the field above. */
    padding: 0.125rem calc(0.75rem + 1px) 0;
    color: var(--collection-text);
    text-align: start;
    white-space: nowrap;
}

.collection-token-select-option > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-token-select-option-active {
    background: var(--collection-token-bg-on-strong);
}

.fi-body .collection-token-select-option strong {
    flex: none;
    font-weight: 500;
}

/* A label starts where the text in its field starts, not at the field's
   edge: the 0.75rem the field pads its text by, plus its 1px border. */
.fi-fo-field-label-ctn {
    padding-inline-start: calc(0.75rem + 1px);
}

/* ---- The item edit panel -------------------------------------------- */

/* An editing surface is light grey with white fields on it: the fields are
   the brightest things there, so they read as the places to type. Elsewhere
   fields sit on the white page and take the grey themselves. */
.collection-item-panel,
.collection-item-panel .fi-modal-header,
.collection-item-panel .fi-modal-footer {
    background: var(--collection-panel-bg);
}

.collection-item-panel .fi-input-wrp {
    background: var(--collection-bg);
}

/* The form's field groups are white cards on the full page. On the panel's
   grey they would box white fields in white, so here they are only headings. */
.collection-item-panel .fi-section {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.collection-item-panel .fi-section .fi-section-header,
.collection-item-panel .fi-section .fi-section-content {
    padding-inline: 0;
}

.collection-item-panel .fi-section .fi-section-header {
    padding-inline-start: calc(0.75rem + 1px);
}

.collection-item-panel .fi-section .fi-section-content-ctn {
    border: 0;
}

/* The panel for adding an item is not click-through -- a stray click on the
   list would lose a half-entered item -- but it does not dim the list either:
   its overlay is there to catch clicks, not to be seen. With no arrows above
   it, its title field starts below the close button instead. */
.fi-modal:has(.collection-item-panel-add) > .fi-modal-close-overlay {
    background: transparent;
}

.collection-item-panel.collection-item-panel-add .fi-modal-content {
    padding-top: 4.25rem;
}

/* "More options" is a line of text with a chevron, not a boxed section
   heading: the fields used less often open beneath it when it is clicked. */
.collection-item-panel .collection-panel-more .fi-section-header {
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0 0 calc(0.75rem + 1px);
    cursor: pointer;
}

.collection-item-panel .collection-panel-more .fi-section-header-heading {
    color: var(--collection-muted-dark);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

/* It is a link and nothing more: no chevron, and once it has been followed
   it is gone. The options it opened stay open; there is nothing to fold them
   away again. */
.collection-item-panel .collection-panel-more .fi-section-header .fi-icon-btn,
.collection-item-panel .collection-panel-more .fi-section:not(.fi-collapsed) .fi-section-header {
    display: none;
}

.collection-item-panel .collection-panel-more .fi-section:not(.fi-collapsed) .fi-section-content {
    padding-top: 0;
}

.collection-item-panel .collection-panel-more .fi-section-header:hover .fi-section-header-heading {
    color: var(--collection-text);
}

.collection-item-panel .collection-panel-more .fi-section-header .fi-icon-btn {
    width: 1.25rem;
    height: 1.25rem;
    min-height: 0;
    background: transparent;
    color: var(--collection-muted-dark);
    transition: rotate 0.15s ease-out;
}

/* Filament's icon is a chevron pointing up. Turned to point right while the
   group is closed, and down once it is open. */
.collection-item-panel .collection-panel-more .fi-section.fi-collapsed .fi-section-header .fi-icon-btn {
    rotate: 90deg;
}

.collection-item-panel .collection-panel-more .fi-section:not(.fi-collapsed) .fi-section-header .fi-icon-btn {
    rotate: 180deg;
}

.collection-item-panel .collection-panel-more .fi-section-content {
    padding-top: 1.5rem;
}

/* An item's images in its edit panel (App\Filament\Forms\ItemImages):
   small, each in its own shape, four to a row and then a new row, 8px
   apart.

   The block is set in from the fields' edges by what their labels are,
   13px, on both sides, so the first picture of a row starts under the
   labels' first letters. In the panel that leaves each picture a little
   under 120px. The width is a most, not a share, so on a full page --
   where the form is far wider -- the pictures stay that size and four to
   a row, at the left. In a row of mixed shapes they hang from its top. */
.collection-item-images {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 7.5rem));
    gap: 0.5rem;
    align-items: start;
    padding-inline: 0.8125rem;
}

/* Each picture is a button that opens it in the lightbox. */
.collection-item-image-button {
    display: block;
    width: 100%;
    border-radius: var(--collection-token-radius);
    cursor: zoom-in;
}

.collection-item-image-button:focus-visible {
    outline: 2px solid var(--collection-accent);
    outline-offset: 2px;
}

.collection-item-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--collection-token-radius);
    /* What shows until the picture arrives. */
    background: var(--collection-token-bg-on-subtle);
}

/* ---- The lightbox ----------------------------------------------------

   An item's pictures, one at a time, over the page dimmed behind them
   (collection-grid.js, openLightbox). The script places the frame and the
   picture; everything here is how they and the things around them look,
   and when those things show. */
.collection-lightbox {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: none;
    overflow: hidden;
    /* The page's ink at four parts in five. It was at half, which let half
       the page's light through and left the picture competing with it;
       this lets through a fifth. What is behind can still be made out, and
       is plainly behind. */
    background: rgb(20 26 22 / 80%);
    color: #fff;
    /* What a cross or an arrow takes on when the pointer is on it: a
       light green, the accent as it is on a dark ground. */
    --collection-lightbox-lit: #7fc496;
    /* easeInOutCubic. One curve for the pane, the picture travelling
       inside it and the dim, so the three cannot drift apart. */
    --collection-lightbox-curve: cubic-bezier(0.65, 0, 0.35, 1);
    outline: none;
    /* The page behind is not to scroll, zoom or select under a finger. */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Opening: the page dims over a second, and in the first half of that the
   picture comes up a little from below as it fades in, slowing to a stop.
   The cross and the arrows come with the picture.

   Closing is the same in reverse and quicker: the picture sinks and fades
   in a fifth of a second, the page clears in two fifths. The script keeps
   the lightbox on the page for that long (LIGHTBOX_CLOSING) and takes
   nothing from the pointer or the keys meanwhile. */
.collection-lightbox-open {
    display: block;
    animation: collection-lightbox-dim 1s ease-out both;
}

.collection-lightbox-open .collection-lightbox-frame,
.collection-lightbox-open .collection-lightbox-title {
    animation: collection-lightbox-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* The row comes up with them only where it is standing outside the picture
   and simply there. Over the picture it is hidden until the pointer asks
   for it, and an entrance holding it at full strength would be in the way
   of that. */
.collection-lightbox-apart.collection-lightbox-open .collection-lightbox-strip {
    animation: collection-lightbox-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Until the first picture can be drawn its frame is kept out of sight and
   its entrance not begun. The script takes this off when the picture is
   ready, and the entrance starts from there. */
.collection-lightbox-waiting .collection-lightbox-frame,
.collection-lightbox-waiting .collection-lightbox-title,
.collection-lightbox-waiting .collection-lightbox-strip {
    opacity: 0;
    animation: none;
}

.collection-lightbox-open .collection-lightbox-close,
.collection-lightbox-open .collection-lightbox-previous,
.collection-lightbox-open .collection-lightbox-next {
    animation: collection-lightbox-show 0.5s ease-out both;
}

.collection-lightbox-closing {
    pointer-events: none;
    animation: collection-lightbox-clear 0.4s ease-in both;
}

.collection-lightbox-closing .collection-lightbox-frame,
.collection-lightbox-closing .collection-lightbox-title {
    animation: collection-lightbox-sink 0.2s ease-in both;
}

.collection-lightbox-apart.collection-lightbox-closing .collection-lightbox-strip {
    animation: collection-lightbox-sink 0.2s ease-in both;
}

.collection-lightbox-closing .collection-lightbox-close,
.collection-lightbox-closing .collection-lightbox-previous,
.collection-lightbox-closing .collection-lightbox-next {
    animation: collection-lightbox-hide 0.2s ease-in both;
}

@keyframes collection-lightbox-dim {
    from {
        background-color: rgb(20 26 22 / 0%);
    }
}

@keyframes collection-lightbox-clear {
    to {
        background-color: rgb(20 26 22 / 0%);
    }
}

@keyframes collection-lightbox-rise {
    from {
        opacity: 0;
        transform: translateY(1.5rem);
    }
}

@keyframes collection-lightbox-sink {
    to {
        opacity: 0;
        transform: translateY(1.5rem);
    }
}

@keyframes collection-lightbox-show {
    from {
        opacity: 0;
    }
}

@keyframes collection-lightbox-hide {
    to {
        opacity: 0;
    }
}

/* The frame is the picture's own edge while it is fitted to the window:
   its corners, its shadow. At 100% it is the whole window and has
   neither.

   Its corners are a token's rather than a control's -- the same 4px every
   other picture in the app is cut to, the thumbnails in the row beneath it
   among them -- so a picture has one corner at every size it is shown. */
.collection-lightbox-frame {
    position: absolute;
    overflow: hidden;
    border-radius: var(--collection-token-radius);
    /* What shows until the picture arrives. */
    background: #202622;
    box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 30%);
    cursor: zoom-in;
    touch-action: none;
}

.collection-lightbox-picture {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    max-width: none;
    transform-origin: 0 0;
    -webkit-user-drag: none;
}

/* Stepping from one picture to the next is a wipe rather than a cut: the
   new picture is uncovered from the side the pictures are travelling
   toward -- the right edge going on, the left edge going back -- so a step
   reads as a step and not as the picture blinking.

   Behind it is the picture it replaces, kept in the frame until the wipe
   is over and held a quarter down in brightness while it is crossed (see
   the rule below). Over bare ground the same wipe read as a picture being
   loaded rather than one being replaced. Where the old picture does not
   fill a frame that has already taken the new one's shape, what shows at
   the sides is the frame's own ground.

   The picture moves as well as being uncovered: it comes in a quarter of
   its own width behind the edge and is carried into place by it, arriving
   home as the edge finishes. That is the difference between a page being
   turned over another and a curtain being drawn across one -- the page is
   attached to its own edge. A quarter and not the whole width, because at
   the whole width it is no longer a wipe but a slide, and the picture
   underneath is never crossed at all, only pushed off.

   For now this is the wipe and nothing else. The slide that brought the
   picture in behind its own edge and the dim on the picture being
   crossed are both held out -- their keyframes are still below -- so
   that what is being judged is the edge and the curve it moves on, with
   nothing else moving at the same time to be mistaken for it.

   The curve is easeInOutCirc, and it is the function rather than the
   cubic-bezier that is published under that name. The two are not the
   same thing to look at. A circle's quarter has a vertical tangent at
   the half-way point, which no bezier can have: the one everyone prints,
   (0.85, 0, 0.15, 1), has to buy its steep middle by holding the ends
   longer than the circle does, and the difference lands exactly where
   the holding is felt. At 100ms of a second, on a 923px frame, the
   circle has crossed 9px and the bezier 5; at 200ms, 39 and 23; at
   300ms, 92 and 62. The circle is the livelier of the two for the whole
   first half and the sharper of the two through the middle -- 118px in a
   frame against 96.

   Written as a linear() of 59 stops taken from the function, dense
   through the middle where it stands up vertically: a twelfth of a
   percent out at worst, against the bezier's four.

   The slide was given a spring once, which carried it a few pixels past
   its place and brought it back, and that read as the picture being
   unsure where it was rather than as a page settling. Nothing here
   overshoots. */
.collection-lightbox-wipe-on .collection-lightbox-reveal {
    animation: collection-lightbox-reveal-on 0.5s
        var(--collection-lightbox-curve) both;
}

.collection-lightbox-wipe-on
    .collection-lightbox-reveal
    .collection-lightbox-picture {
    animation: collection-lightbox-reveal-on-picture 0.5s
        var(--collection-lightbox-curve) both;
}

.collection-lightbox-wipe-back .collection-lightbox-reveal {
    animation: collection-lightbox-reveal-back 0.5s
        var(--collection-lightbox-curve) both;
}

.collection-lightbox-wipe-back
    .collection-lightbox-reveal
    .collection-lightbox-picture {
    animation: collection-lightbox-reveal-back-picture 0.5s
        var(--collection-lightbox-curve) both;
}

/* The picture being crossed goes down a quarter in brightness as the
   other arrives, which is what gives the edge something to be an edge
   between: two photographs of the same object on the same ground can
   otherwise meet almost invisibly.

   It dims early rather than in step with the wipe. Tracking the wipe
   would have it at its darkest when it is nearly covered and barely
   dimmed at the half-way point, which is exactly when the edge is out in
   the middle of the frame and most wants the help. What it has to beat
   is the middle of the crossing, not the end: 150ms of a 500ms crossing,
   done with the edge an eighth of the way over. */
.collection-lightbox-wipe-on .collection-lightbox-picture-under,
.collection-lightbox-wipe-back .collection-lightbox-picture-under {
    animation: collection-lightbox-recede 0.15s ease-out both;
}

@keyframes collection-lightbox-recede {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(0.75);
    }
}

/* The picture is uncovered by a pane rather than by a clip.

   The pane is the size of the frame, has the picture inside it, and is
   slid across: at 100% it is entirely off to the right and nothing of
   the picture shows, at 0 it lies over the frame and all of it does.

   The picture is slid back the other way inside it, but by 75 rather
   than the 100 that would hold it perfectly still: the quarter that is
   left over is the slide, and it has the picture come in a quarter of
   its own width behind its own edge and be carried into place by it.
   That is the difference between a page being turned over another and a
   curtain being drawn across one -- the page is attached to its edge.
   Since the pane and the picture are on one curve, what the eye sees of
   that offset is a quarter of the width decaying on the curve, and at
   the end both are at nothing.

   Two translates where there was one clip-path, and that is the whole
   point of it. A clip-path animation is painted on the main thread,
   frame by frame, and a full-frame photograph repainted sixty times a
   second is more than that thread has to give while it is also decoding
   the next picture: it stutters, and skipped frames in the slow parts of
   a curve are exactly the frames that carry the easing. Transforms are
   composited; they keep their timing whatever else is happening. The
   wipe was briefly given a light riding its edge, which was a transform
   and did run on the curve: the two were plainly at odds, which is how
   the clip was caught. */
.collection-lightbox-reveal {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

@keyframes collection-lightbox-reveal-on {
    from {
        translate: 100%;
    }

    to {
        translate: 0;
    }
}

@keyframes collection-lightbox-reveal-on-picture {
    from {
        translate: -75%;
    }

    to {
        translate: 0;
    }
}

@keyframes collection-lightbox-reveal-back {
    from {
        translate: -100%;
    }

    to {
        translate: 0;
    }
}

@keyframes collection-lightbox-reveal-back-picture {
    from {
        translate: 75%;
    }

    to {
        translate: 0;
    }
}


@media (prefers-reduced-motion: reduce) {
    .collection-lightbox-wipe-on .collection-lightbox-reveal,
    .collection-lightbox-wipe-back .collection-lightbox-reveal,
    .collection-lightbox-wipe-on .collection-lightbox-picture,
    .collection-lightbox-wipe-back .collection-lightbox-picture,
    .collection-lightbox-wipe-on .collection-lightbox-picture-under,
    .collection-lightbox-wipe-back .collection-lightbox-picture-under {
        animation: none;
    }
}

/* The picture being crossed. It is marked rather than left to its place in
   the frame, so the rules above cannot take hold of it as well -- which
   they did, and wiped both pictures away together, leaving the frame's
   ground showing where the old picture should have been. */
.collection-lightbox-picture-under {
    pointer-events: none;
}

.collection-lightbox-zoomed .collection-lightbox-frame {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: grab;
}

.collection-lightbox-dragging .collection-lightbox-frame {
    cursor: grabbing;
}

/* What it is a picture of: the name, then the subtitle and the year in a
   lighter weight. White, with nothing put behind it, and taking no part in
   what the pointer is over.

   Where it goes is the script's (collection-grid.js, placeLightboxBands):
   in the margin above the picture when the window has the height to spare,
   and across the top of the picture itself when it has not. The padding
   here is the second of those -- air below the name so the picture does not
   start right under it -- and the band rule further down is the first. */
.collection-lightbox-title {
    position: absolute;
    padding: 1.25rem 1.5rem 3rem;
    font-size: 1rem;
    line-height: 1.5rem;
    text-align: center;
    pointer-events: none;
}

.collection-lightbox-title-name {
    font-weight: 500;
}

.collection-lightbox-title-year {
    margin-inline-start: 1rem;
}

/* The item's pictures in a row beneath the one that is open, the open one
   ringed. The row is the whole band, so that the pointer coming anywhere
   near it brings it up when it is over the picture. Placed by the script
   with the name, below the picture or along the bottom of it. */
.collection-lightbox-strip {
    position: absolute;
    display: flex;
    justify-content: safe center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 3rem 1.5rem 1.5rem;
    cursor: default;
    scrollbar-width: none;
}

.collection-lightbox-strip::-webkit-scrollbar {
    display: none;
}

/* Standing outside the picture rather than lying over it. The bands meet
   the picture's edges and this spacing is the gap, so the name is a line of
   type above the picture and the row a line of pictures below it, both on
   the dimmed page. Nothing is over the photograph.

   What the margins are worth is the script's to decide: it measures these
   bands and gives them the height only while the picture can spare it. */
.collection-lightbox-apart .collection-lightbox-title {
    padding: 0 1.5rem 0.75rem;
}

/* The row's padding is also the room it has: a row that scrolls sideways
   has to be asked for height as well, or the lift and the ring round a
   thumbnail are cut off at the band's edges. At the sides it is the whole
   gutter -- outside the picture the row is given the window's full width
   (placeLightboxBands), not the width between the arrows, so a long row
   has as much of the window as there is to run in. */
.collection-lightbox-apart .collection-lightbox-strip {
    padding: 0.75rem 1.5rem 0.25rem;
}

/* Each has a hairline round it, outside its own edge: black at a quarter
   strength, which sets a pale picture off from a pale one behind it and
   is all but invisible on a dark one.

   Pointed at, one lifts a little and takes a white hairline in place of
   the black -- moved with `translate` rather than `transform`, which the
   row's own coming and going already has. */
.collection-lightbox-thumb {
    flex: none;
    overflow: hidden;
    border-radius: var(--collection-token-radius);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 25%);
    cursor: pointer;
    transition: translate 0.15s ease-out, box-shadow 0.15s ease-out;
}

.collection-lightbox-thumb:hover,
.collection-lightbox-thumb:focus-visible {
    translate: 0 -0.25rem;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 55%);
}

/* Which one is up is told by strength as well as by the ring round it: the
   rest of the row is held back to two thirds, comes most of the way up
   under the pointer, and only the one being looked at is at full. A ring
   alone was doing all the work, and in the light scheme it was doing it in
   --collection-accent-text, a green meant for white paper and nearly lost
   on this ground. The lightbox's own lit green is what everything else
   here answers the pointer with. */
.collection-lightbox-thumb img {
    display: block;
    width: auto;
    height: 3rem;
    opacity: 0.65;
    transition: opacity 0.15s ease-out;
}

.collection-lightbox-thumb:hover img,
.collection-lightbox-thumb:focus-visible img {
    opacity: 0.9;
}

.collection-lightbox-thumb-current img,
.collection-lightbox-thumb-current:hover img {
    opacity: 1;
}

.collection-lightbox-thumb-current {
    outline: 2px solid var(--collection-lightbox-lit);
    outline-offset: 2px;
}

.collection-lightbox-thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* The cross, and the two arrows. The cross is always there. Each arrow is
   the whole margin beside the picture, top to bottom, so anywhere in it
   steps that way. */
.collection-lightbox-close,
.collection-lightbox-previous,
.collection-lightbox-next {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.collection-lightbox-close svg,
.collection-lightbox-previous svg,
.collection-lightbox-next svg {
    width: 2rem;
    height: 2rem;
}

.collection-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border-radius: var(--collection-control-radius);
}

/* Pointed at, a cross or an arrow takes a little colour and nothing is
   put behind it. An arrow's button is the whole margin, so it is the
   arrow itself that has to be under the pointer: the margin only brings
   it into view. */
.collection-lightbox-close svg,
.collection-lightbox-previous svg,
.collection-lightbox-next svg {
    transition: color 0.15s ease-out, opacity 0.2s ease-out;
}

.collection-lightbox-close:hover,
.collection-lightbox-close:focus-visible,
.collection-lightbox-previous svg:hover,
.collection-lightbox-next svg:hover,
.collection-lightbox-previous:focus-visible svg,
.collection-lightbox-next:focus-visible svg {
    color: var(--collection-lightbox-lit);
}

.collection-lightbox-close:hover,
.collection-lightbox-close:focus-visible {
    background: transparent;
    outline: none;
}

.collection-lightbox-previous,
.collection-lightbox-next {
    top: 5rem;
    bottom: 0;
    width: 5.5rem;
}

.collection-lightbox-previous {
    left: 0;
}

.collection-lightbox-next {
    right: 0;
}

/* One picture has nowhere to step to, and nothing to pick from. */
.collection-lightbox-single .collection-lightbox-previous,
.collection-lightbox-single .collection-lightbox-next,
.collection-lightbox-single .collection-lightbox-strip {
    display: none;
}

/* At 100% there is only the picture: the window is all of it, and the
   things laid over it would be in the way of the hand moving it. */
.collection-lightbox-zoomed .collection-lightbox-title,
.collection-lightbox-zoomed .collection-lightbox-strip,
.collection-lightbox-zoomed .collection-lightbox-previous,
.collection-lightbox-zoomed .collection-lightbox-next {
    display: none;
}

/* The row of pictures and the arrows are there when the pointer is over
   where they are, when the keyboard is on them, and for a moment after the
   lightbox opens. Only where there is a pointer to do that with. */
@media (hover: hover) {
    .collection-lightbox-strip {
        opacity: 0;
        transition: opacity 0.2s ease-out;
    }

    /* The row comes up from below as it comes into view, and goes back
       down as it leaves. It is the pictures that move and not the band
       they are in: the band is what the pointer has to be over, and a band
       that moved would slide out from under it. */
    .collection-lightbox-thumb {
        transform: translateY(1rem);
        transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    .collection-lightbox-fresh .collection-lightbox-thumb,
    .collection-lightbox-strip:hover .collection-lightbox-thumb,
    .collection-lightbox-strip:focus-within .collection-lightbox-thumb,
    .collection-lightbox-apart .collection-lightbox-thumb {
        transform: none;
    }

    .collection-lightbox-previous svg,
    .collection-lightbox-next svg {
        opacity: 0;
    }

    /* Outside the picture the row is in nobody's way, so it is simply
       there to be read and picked from. The hiding below is for the row
       lying over the photograph. */
    .collection-lightbox-apart .collection-lightbox-strip,
    .collection-lightbox-fresh .collection-lightbox-strip,
    .collection-lightbox-fresh .collection-lightbox-previous svg,
    .collection-lightbox-fresh .collection-lightbox-next svg,
    .collection-lightbox-strip:hover,
    .collection-lightbox-strip:focus-within,
    .collection-lightbox-previous:hover svg,
    .collection-lightbox-previous:focus-visible svg,
    .collection-lightbox-next:hover svg,
    .collection-lightbox-next:focus-visible svg {
        opacity: 1;
    }
}

.collection-lightbox-previous:focus-visible,
.collection-lightbox-next:focus-visible {
    outline: none;
}

@media (max-width: 40rem) {
    .collection-lightbox-previous,
    .collection-lightbox-next {
        width: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-lightbox-open,
    .collection-lightbox-closing,
    .collection-lightbox-open .collection-lightbox-frame,
    .collection-lightbox-open .collection-lightbox-title,
    .collection-lightbox-closing .collection-lightbox-title,
    .collection-lightbox-apart.collection-lightbox-open
        .collection-lightbox-strip,
    .collection-lightbox-apart.collection-lightbox-closing
        .collection-lightbox-strip,
    .collection-lightbox-open .collection-lightbox-close,
    .collection-lightbox-open .collection-lightbox-previous,
    .collection-lightbox-open .collection-lightbox-next {
        animation: none;
    }

    .collection-lightbox-strip,
    .collection-lightbox-thumb,
    .collection-lightbox-thumb img,
    .collection-lightbox-previous svg,
    .collection-lightbox-next svg {
        transition: none;
    }

    .collection-lightbox-thumb:hover,
    .collection-lightbox-thumb:focus-visible {
        translate: none;
    }

    .collection-lightbox-thumb {
        transform: none;
    }
}

/* The facts at the foot of an edit panel -- added, updated and the like
   (see App\Filament\Forms\RecordInfo). Set apart from the fields by a rule
   and by being quieter than them: small, grey, a label and its value on
   each line with the values in one column. */
.collection-record-info {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.25rem 1rem;
    margin: 0;
    /* The rule runs the width of the fields; the text starts where their
       labels do, 13px in. */
    padding: 1.25rem 0.8125rem 0;
    border-top: 1px solid var(--collection-border);
    color: var(--collection-muted);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.collection-record-info-row {
    display: contents;
}

.collection-record-info dt,
.collection-record-info dd {
    margin: 0;
    font-weight: 400;
}

.collection-record-info dd {
    color: var(--collection-muted-dark);
    font-variant-numeric: tabular-nums;
}

/* The arrows share the panel's top line with the close button, which
   Filament pins to the top corner; the header that holds it is given no
   height of its own, so the arrows can sit level with it. The title field
   starts a clear step below them both. */
.collection-item-panel .fi-modal-content {
    padding-top: 0.75rem;
}

/* The arrows are 24px glyphs in 40px buttons, so 8px of each button is air.
   The negative margin takes that, and the 8px more it would otherwise add,
   back out of the form's 24px gap, leaving the glyphs about as far above the
   title field as the title field is above the first label. */
.collection-panel-nav {
    display: flex;
    gap: 0.25rem;
    margin-inline-start: 0.125rem;
    margin-bottom: -0.5rem;
}

.collection-panel-nav-button {
    display: inline-flex;
    width: var(--collection-control-height);
    height: var(--collection-control-height);
    align-items: center;
    justify-content: center;
    border-radius: var(--collection-control-radius);
    color: var(--collection-text);
}

.collection-panel-nav-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

.collection-panel-nav-button:hover:not(:disabled),
.collection-panel-nav-button:focus-visible {
    background: var(--collection-cell-hover);
    outline: none;
}

.collection-panel-nav-button:disabled {
    color: var(--collection-button-disabled-text);
    cursor: default;
}

/* A hairline down the panel's leading edge: the darkest grey at 15%. It is
   drawn as a shadow, not a border, so it sits just outside the panel's own
   background and tints whatever part of the list is under it. */
.collection-item-panel {
    border: 0;
    border-radius: 0;
    box-shadow: var(--collection-shadow-panel-edge);
}

/* The panel comes in over a third of a second, not half of one, and it is
   moving from the first frame.

   It used to take 0.5s on a curve whose first handle sat at y=0, so it
   spent its opening moments barely moving -- and all of that came *after*
   the round trip that fetches the form, which on the production host is
   about a third of a second by itself. Click to settled was approaching a
   second, most of it this.

   Now it leaves at speed and decelerates into place, which is both quicker
   and a truer movement for something sliding in from the edge: the weight
   is in how it settles rather than in how slowly it starts. */
.fi-modal.fi-modal-slide-over > .fi-modal-window-ctn > .collection-item-panel.fi-transition-enter {
    transition-duration: 0.34s;
    transition-timing-function: cubic-bezier(0.32, 0.72, 0.1, 1);
}

.fi-modal.fi-modal-slide-over > .fi-modal-window-ctn > .collection-item-panel.fi-transition-leave {
    transition-timing-function: ease-in-out;
}

/* Moving the panel from one item to another closes it and opens it again
   underneath. That is not something to animate: the panel should simply
   change what it shows. The grid script sets this while it happens. */
.collection-panel-switching .fi-modal .collection-item-panel {
    transition: none !important;
}

/* The name field below is the heading people see. This one stays for screen
   readers, which announce the dialog by it. */
.collection-item-panel .fi-modal-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.collection-item-panel .fi-modal-header {
    height: 0;
    min-height: 0;
    border-bottom: 0;
    padding-block: 0;
}

/* The close button stays at the panel's top corner while the form scrolls
   under it, so it is given a ground of its own: a square the size of a
   button. At the top of the form that square is the panel's own grey and
   nothing shows. Once the form has moved (the script notes it on the
   page's root; see syncPanelScrolled) it is one shade darker, enough to
   stand a little apart from what passes beneath. A shadow was tried there
   and looked out of place. Pointed at, it goes a shade darker again, as
   the arrows on the same line do.

   The cross is drawn as those arrows are: both are 24px glyphs of the one
   set with a 1.5px line, and it takes their colour, the text's, where
   Filament had it a paler grey that made it look the lighter of the two. */
.collection-item-panel .fi-modal-close-btn,
.collection-item-panel .fi-modal-close-btn:hover,
.collection-item-panel .fi-modal-close-btn:focus-visible {
    color: var(--collection-text);
}

.collection-item-panel .fi-modal-close-btn {
    top: 0.75rem;
    background: var(--collection-panel-bg);
    transition: background-color 0.15s ease-out;
}

.collection-panel-scrolled .collection-item-panel .fi-modal-close-btn {
    background: var(--collection-hover);
}

/* After the rule above, which it has to outrank while the form is
   scrolled as well as when it is not. */
.fi-body .collection-item-panel .fi-modal-close-btn:hover,
.fi-body .collection-item-panel .fi-modal-close-btn:focus-visible {
    background: var(--collection-cell-hover);
}

@media (prefers-reduced-motion: reduce) {
    .collection-item-panel .fi-modal-close-btn,
    .fi-layout-sidebar-toggle-btn {
        transition: none;
    }
}

.collection-item-panel .fi-modal-close-btn .fi-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* The item's name, set as the panel's title. It carries no fill until it is
   pointed at or being edited, so at rest it reads as a heading, not a field. */
/* The heading is text on the page until it is pointed at, when it shows
   itself to be a field. (.collection-panel-subtitle is only set where the
   subtitle is the heading's second line, so this does not reach the panel's
   ordinary subtitle field.) */
:is(.collection-panel-title, .collection-panel-subtitle) .fi-input-wrp {
    background: transparent;
}

:is(.collection-panel-title, .collection-panel-subtitle) .fi-input-wrp:hover,
:is(.collection-panel-title, .collection-panel-subtitle) .fi-input-wrp:focus-within {
    background: var(--collection-bg);
}

.fi-body :is(.collection-panel-title, .collection-panel-subtitle) textarea {
    /* 9px over 7px, for the same reason as the fields above. */
    padding-block: 0.5625rem 0.4375rem;
    /* The page title's size: a record's name is its panel's title. */
    font-size: 3rem;
    font-weight: 500;
    line-height: 3.25rem;
}

/* On a full page the name is not a panel's title beside a list, it is the
   page's own, and the title bar above it carries only the collection. So it
   is set half again the size it takes in the panel -- 72px against the 48px
   a page heading would have been -- and the view page sets its name entry to
   match, so reading an item and editing one open at the same size.

   The subtitle follows as the heading's second line: the same size, at the
   regular weight against the name's medium, so the two read as one block
   with the name leading it.

   Later than the rule above rather than heavier than it: both are one class
   and an element, so the order is what decides. */
.fi-resource-edit-record-page .collection-panel-title textarea,
.fi-resource-create-record-page .collection-panel-title textarea,
.fi-resource-edit-record-page .collection-panel-subtitle textarea,
.fi-resource-create-record-page .collection-panel-subtitle textarea {
    font-size: var(--collection-page-title-size);
    line-height: var(--collection-page-title-line);
}

.fi-resource-view-record-page .collection-panel-title {
    font-size: var(--collection-page-title-size);
    font-weight: 500;
    line-height: var(--collection-page-title-line);
}

/* The subtitle carries on from the name within the one heading, set apart
   by weight alone. Stated after the inherit above, which it must override. */
.fi-resource-view-record-page .collection-panel-title .collection-item-heading-subtitle {
    font-weight: 400;
}

.fi-resource-edit-record-page .collection-panel-subtitle textarea,
.fi-resource-create-record-page .collection-panel-subtitle textarea {
    font-weight: 400;
}

/* The subtitle runs straight on from the name, as the next line of the same
   heading: the boxes give up the padding between them, and the gap the form
   would leave between two fields is taken back out, so the only space left
   is the line-height itself. */
.fi-resource-edit-record-page .collection-panel-subtitle,
.fi-resource-create-record-page .collection-panel-subtitle {
    margin-top: calc(0rem - var(--collection-page-title-gap));
}

.fi-body :is(.fi-resource-edit-record-page, .fi-resource-create-record-page)
    .collection-panel-title textarea {
    padding-bottom: 0;
}

.fi-body :is(.fi-resource-edit-record-page, .fi-resource-create-record-page)
    .collection-panel-subtitle textarea {
    padding-top: 0;
}


/* The name reads as a heading on the view page, not as a field's value.
   An entry sets its own size a few levels down -- on the content column, and
   again on the text itself -- so the size on the wrapper above does not
   reach the words without this. */
.fi-resource-view-record-page .collection-panel-title :is(
    .fi-in-entry-content-col,
    .fi-in-entry-content-ctn,
    .fi-in-entry-content,
    .fi-in-text,
    .fi-in-text-item
) {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.fi-resource-view-record-page .collection-panel-title :is(
    .collection-item-heading-name,
    .collection-item-heading-subtitle
) {
    font-size: inherit;
    line-height: inherit;
}

/* An entry's text sits in a box that clamps it to a number of lines, and a
   box of that kind drops a text node that is only a space -- which is the
   single space holding the name and the subtitle apart. A heading is not
   clamped anyway, so it is laid out as ordinary text. */
.fi-resource-view-record-page .collection-panel-title .fi-in-text-item {
    display: block;
}


/* The row whose item is open in the panel: a rounded block in the selection
   green, which holds while the pointer is elsewhere. */
.collection-grid-table .fi-ta-row .collection-grid-row.collection-grid-row-selected,
.collection-grid-table .fi-ta-row:hover .collection-grid-row.collection-grid-row-selected {
    --collection-row-fill: var(--collection-selected-bg);

    color: var(--collection-selected-text);
}

.collection-grid-table .fi-ta-row .collection-grid-row-selected .collection-grid-cell-subtitle {
    color: var(--collection-selected-text-muted);
}

.collection-grid-table .fi-ta-row .collection-grid-row-selected .collection-grid-token {
    background: var(--collection-selected-token-bg);
    color: var(--collection-selected-text);
}

.fi-sidebar-item-label,
.fi-sidebar-group-label,
.fi-ta-header-cell-label {
    font-weight: 400;
}

/* Nothing in the nav is bold except the page you are on: weight marks
   the selection, and colour (ink for the main entries, a quieter grey for
   the collections, favourites and More) carries the hierarchy. */
.fi-sidebar
    .fi-sidebar-group-items
    > .fi-sidebar-item
    > .fi-sidebar-item-btn
    > .fi-sidebar-item-label {
    color: var(--collection-text);
    font-weight: 400;
}

.fi-sidebar-item-btn:hover {
    background: var(--collection-token-bg);
}

.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn:hover {
    border: 0;
    background: var(--collection-selected-bg);
    box-shadow: none;
    color: var(--collection-selected-text);
}

.fi-sidebar
    .fi-sidebar-item.fi-active
    > .fi-sidebar-item-btn
    > .fi-sidebar-item-label {
    color: var(--collection-selected-text);
    font-weight: 500;
}

/* A plain two-column list, for a page that reads values out of the items
   and has no records of its own to edit. Set like the grid: one line a row,
   rules inset to the text. */

.collection-simple-list-header > :first-child,
.collection-simple-list-row > :first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-simple-list-number {
    flex: none;
    width: 4rem;
    text-align: right;
}

/* A heading that sorts by a column of numbers has its arrow before the
   word, so the word still ends where the numbers under it end. */
.collection-simple-list-number .collection-grid-sort-button {
    flex-direction: row-reverse;
}

.collection-simple-list-actions {
    display: flex;
    flex: none;
    width: 9rem;
    justify-content: flex-end;
    gap: 1rem;
}

.collection-simple-list-header,
.collection-simple-list-row {
    display: flex;
    height: var(--collection-row-height);
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--collection-border);
    padding: var(--collection-cell-pad-top) 0 var(--collection-cell-pad-bottom);
    line-height: 1.25rem;
}

.fi-body .collection-simple-list-header span {
    color: var(--collection-muted-dark);
    font-size: var(--collection-grid-header-font-size);
    font-weight: 500;
}

.collection-simple-list-empty {
    padding-block: 1rem;
    color: var(--collection-muted);
}

.fi-ta-ctn,
.fi-section {
    border-color: var(--collection-border);
    border-radius: 0.25rem;
    background: var(--collection-bg);
    box-shadow: none;
}

.fi-ta-header-ctn,
.fi-ta-content-ctn,
.fi-ta-footer {
    background: var(--collection-bg);
}

.collection-grid-table .fi-pagination,
.fi-resource-list-records-page .fi-ta-main > .fi-pagination {
    position: sticky;
    z-index: 12;
    bottom: 0;
    width: calc(
        var(--collection-visible-content-width) +
        var(--collection-main-inline-gutter) +
        var(--collection-main-inline-gutter)
    );
    min-height: var(--collection-footer-height);
    margin-inline-start: calc(0rem - var(--collection-main-inline-gutter));
    background: var(--collection-bg);
    padding-inline:
        calc(var(--collection-main-inline-gutter) + 0.75rem)
        var(--collection-main-inline-gutter);
}

.collection-grid-table .fi-pagination-overview,
.collection-grid-table .fi-pagination-item-label,
.collection-grid-table .fi-pagination .fi-btn-label,
.collection-grid-table .fi-pagination-records-per-page-select,
.fi-resource-list-records-page .fi-pagination-overview,
.fi-resource-list-records-page .fi-pagination-item-label,
.fi-resource-list-records-page .fi-pagination .fi-btn-label,
.fi-resource-list-records-page .fi-pagination-records-per-page-select {
    font-weight: 400;
}

.collection-grid-table .fi-pagination-item.fi-active .fi-pagination-item-label,
.fi-resource-list-records-page .fi-pagination-item.fi-active .fi-pagination-item-label {
    font-weight: 500;
}

/* The filters trigger's count is rendered by the script as
   .collection-filter-count; Filament's own badge is redundant. It used to be
   hidden only under .collection-filter-button -- a class the script adds --
   so between first paint and the script running the badge flashed its "0".
   Hiding it here means it never appears. */
.fi-icon-btn-badge-ctn {
    display: none !important;
}

/* The condition builder needs more room than the fi-width-xs panel it is
   given, otherwise every chosen value wraps mid-name. That class sets
   max-width from --container-xs with !important, so the variable is redefined
   here rather than the property fought over. */
.fi-ta-filters-dropdown > .fi-dropdown-panel {
    --container-xs: min(30rem, calc(100vw - 2rem));

    width: min(30rem, calc(100vw - 2rem));
}

/* A badge carrying a delete control is a token: a select's chosen values and
   the filter indicators both render as one. Filament colours them with the
   accent, which is why they came out red. The delete control itself is
   .fi-badge-delete-btn in both cases, and in the grid it is
   .collection-grid-token-remove, so all three are sized together. */
.fi-badge:has(> .fi-badge-delete-btn) {
    /* Flex-start, with the mark centred on the first line by its own margin.
       Baseline alignment looked equivalent but was not: the button holds a
       screen-reader label, so it took its baseline from that text and drifted
       with whatever font size each context inherited -- which is why the mark
       sat at a different height in the filter bar than in a field. */
    align-items: flex-start;
    /* Equal to the height the padding and line box already produce, so it
       changes nothing for a normal token and holds the height of one whose
       label is empty. */
    min-height: 1.5rem;
    border: 0;
    /* Filament rings its badges with a box-shadow in the accent, which reads
       as a pink border; `border: 0` does not touch it. */
    box-shadow: none;
    border-radius: var(--collection-token-radius);
    background: var(--collection-token-bg);
    color: var(--collection-text);
    font-weight: 400;
    /* Filament sizes badge text and padding per size class, and a select's
       chips take a size of their own, which is what made field tokens taller
       than the ones beside them. Restated here so one height holds everywhere. */
    font-size: 0.875rem;
    line-height: var(--collection-token-line);
    padding: var(--collection-token-pad-block) var(--collection-token-gap);
    gap: var(--collection-token-gap);
}

/* The filter bar has a gray band of its own, on which the resting token
   background reads lighter than the surface behind it. One step up the ramp,
   the same step a token takes on a hovered row. */
.fi-ta-filter-indicators .fi-badge:has(> .fi-badge-delete-btn) {
    background: var(--collection-token-bg-on-subtle);
}

/* The remove control sits against the top of the token rather than centred on
   it, so it stays put when the label wraps to several lines. */
.collection-grid-token,
.collection-grid-token-list > .collection-grid-token {
    align-items: flex-start;
}

/* One line tall, so on a single-line token the control reads as centred while
   a wrapped label leaves it against the top right.

   Filament names this control differently depending on where it renders: a
   badge's is .fi-badge-delete-btn, and a select spells its own
   .fi-select-input-badge-remove (multiple) or .fi-select-input-value-remove-btn
   (single). They are listed together so a token cannot pick up one size in the
   filter menu and another in the filter bar. */
.fi-badge-delete-btn,
.fi-select-input-badge-remove,
.fi-select-input-value-remove-btn {
    display: inline-flex;
    /* The icon behind this is collection-token-remove, whose ink spans its
       whole viewBox, so this is the size of the mark you actually see -- not
       roughly half it, as with Heroicons' x-mark. */
    width: var(--collection-token-mark);
    height: var(--collection-token-mark);
    min-height: 0;
    flex: 0 0 var(--collection-token-mark);
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: none;
    color: var(--collection-text);
    line-height: 1;
    opacity: 1;
    /* Centres the mark on the label's first line. Pure arithmetic on two known
       lengths, so it lands identically in every context. */
    margin-top: calc((var(--collection-token-line) - var(--collection-token-mark)) / 2);
    transition: color 0.12s ease;
}

/* Guarded: without mask support the background below would paint a solid
   square, so where it is missing the injected icon is left to show instead. */
@supports ((-webkit-mask-image: none) or (mask-image: none)) {
    .fi-badge-delete-btn > svg,
    .fi-badge-delete-btn > .fi-icon,
    .fi-select-input-badge-remove > svg,
    .fi-select-input-value-remove-btn > svg {
        display: none;
    }

    .fi-badge-delete-btn::before,
    .fi-select-input-badge-remove::before,
    .fi-select-input-value-remove-btn::before {
        content: '';
        display: block;
        width: 100%;
        height: 100%;
        /* Painted through a mask so the mark takes its colour from the button
           and reddens on hover with nothing else to keep in step. */
        background: currentColor;
        -webkit-mask: var(--collection-token-mark-image) center / 100% 100% no-repeat;
        mask: var(--collection-token-mark-image) center / 100% 100% no-repeat;
    }
}

/* The mark itself reddens; no disc behind it. */
.fi-badge-delete-btn:hover,
.fi-badge-delete-btn:focus-visible,
.fi-select-input-badge-remove:hover,
.fi-select-input-badge-remove:focus-visible,
.fi-select-input-value-remove-btn:hover,
.fi-select-input-value-remove-btn:focus-visible {
    background: none;
    color: var(--collection-danger);
    outline: none;
}

/* The glyph carries its own colour, so reddening the button alone left it
   unchanged. */
.fi-badge-delete-btn:hover .fi-icon,
.fi-badge-delete-btn:hover svg,
.fi-badge-delete-btn:focus-visible .fi-icon,
.fi-badge-delete-btn:focus-visible svg,
.fi-select-input-badge-remove:hover svg,
.fi-select-input-badge-remove:focus-visible svg,
.fi-select-input-value-remove-btn:hover svg,
.fi-select-input-value-remove-btn:focus-visible svg {
    color: var(--collection-danger);
}

/* The filters trigger's count is rendered by the script as
   .collection-filter-count; Filament's own badge is redundant. It used to be
   hidden only under .collection-filter-button -- a class the script adds --
   so between first paint and the script running the badge flashed its "0".
   Hiding it here means it never appears. */
.fi-icon-btn-badge-ctn {
    display: none !important;
}

/* The condition builder puts a field, an operator and a value on one row, so
   its dropdown needs more room than the fi-width-xs panel it is given. */
.fi-ta-filters-dropdown > .fi-dropdown-panel,
.fi-ta-filters-dropdown > .fi-dropdown-panel.fi-width-xs {
    width: min(44rem, calc(100vw - 2rem)) !important;
    max-width: none !important;
}

/* A selected value in a select is the same thing as a token in the grid, so it
   looks the same. Filament renders these as badges, which default to the
   accent -- hence the red. */

.collection-cost-total {
    margin-inline-start: 1rem;
    white-space: nowrap;
    /* Rendered as a button so it is focusable and announced as a control, but
       it should read as the surrounding pagination text. */
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color 0.12s ease;
}

.collection-cost-total:hover,
.collection-cost-total:focus-visible {
    color: var(--collection-text);
}

/* ---- Pressed ---------------------------------------------------------

   What was clicked takes, at once, the look it will have when the answer
   arrives: a nav item looks chosen, a row looks opened, a button looks
   held. Set from the script at pointerdown and cleared when the work is
   done (see markPressed() in collection-grid.js), so the wait is attached
   to the thing that started it rather than only to the bar along the top. */

.fi-sidebar .fi-sidebar-item-btn.collection-pressed {
    background: var(--collection-selected-bg);
    color: var(--collection-selected-text);
}

/* Through the row's own fill, not a background on the row: the row hangs a
   gutter's width into the margin and pads it back, so anything painted on
   the box itself reaches out past where the cells start. The fill is drawn
   by ::before, inset to the cells, the way hover and the open row are. */
.collection-grid-table .fi-ta-row .collection-grid-row.collection-pressed {
    --collection-row-fill: var(--collection-selected-bg);
}

.fi-body .fi-btn.collection-pressed,
.fi-body .fi-icon-btn.collection-pressed {
    background: var(--collection-button-tertiary-selected-bg);
}

.fi-pagination-items a.collection-pressed {
    background: var(--collection-button-tertiary-selected-bg);
}

/* The press is immediate; only its fading out is animated, so nothing is
   waiting on a transition to show that the click landed. */
.collection-pressed {
    transition: none;
}

/* The amount is held back until the mark is pointed at. Faded rather than
   taken out of the page: the footer's width would otherwise change as the
   pointer crossed it. */
.collection-cost-total-amount {
    opacity: 0;
    transition: opacity 0.12s ease;
}

.collection-cost-total:hover .collection-cost-total-amount,
.collection-cost-total:focus-visible .collection-cost-total-amount {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .collection-cost-total-amount {
        transition: none;
    }
}

.collection-grid-table .fi-pagination-items,
.fi-resource-list-records-page .fi-pagination-items {
    align-items: stretch;
    overflow: hidden;
    border: 0;
    border-radius: var(--collection-control-radius);
    box-shadow: none;
}

.collection-grid-table .fi-pagination-item,
.fi-resource-list-records-page .fi-pagination-item {
    display: flex;
    height: var(--collection-control-height);
    align-items: stretch;
    border: 0;
}

.collection-grid-table .fi-pagination-item + .fi-pagination-item,
.fi-resource-list-records-page .fi-pagination-item + .fi-pagination-item {
    border-inline-start: 1px solid var(--collection-border);
}

.collection-grid-table .fi-pagination-item-btn,
.fi-resource-list-records-page .fi-pagination-item-btn {
    width: 100%;
    height: var(--collection-control-height);
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--collection-text);
}

.collection-grid-table
    .fi-pagination-item:not(.fi-disabled)
    .fi-pagination-item-btn
    :is(.fi-icon, .fi-pagination-item-label),
.fi-resource-list-records-page
    .fi-pagination-item:not(.fi-disabled)
    .fi-pagination-item-btn
    :is(.fi-icon, .fi-pagination-item-label) {
    color: var(--collection-text);
}

.collection-grid-table .fi-pagination-item.fi-active .fi-pagination-item-btn,
.fi-resource-list-records-page .fi-pagination-item.fi-active .fi-pagination-item-btn {
    background: var(--collection-button-tertiary-selected-bg);
    color: var(--collection-text);
}

.collection-grid-table .fi-pagination-item.fi-disabled .fi-pagination-item-btn,
.fi-resource-list-records-page .fi-pagination-item.fi-disabled .fi-pagination-item-btn {
    background: var(--collection-button-disabled-bg);
    color: var(--collection-button-disabled-text);
}

.collection-grid-table
    .fi-pagination-item.fi-disabled
    .fi-pagination-item-btn
    :is(.fi-icon, .fi-pagination-item-label),
.fi-resource-list-records-page
    .fi-pagination-item.fi-disabled
    .fi-pagination-item-btn
    :is(.fi-icon, .fi-pagination-item-label) {
    color: var(--collection-button-disabled-text);
}

.fi-resource-list-records-page .fi-ta-main {
    display: flex;
    min-height: calc(100dvh - var(--collection-header-height));
    flex-direction: column;
}

.fi-resource-list-records-page .fi-ta-main > .fi-pagination {
    margin-top: auto;
}

.fi-resource-list-records-page .fi-ta-content-ctn {
    border-top: 0 !important;
    max-height: none;
    overflow: visible;
}

.fi-resource-list-records-page .fi-ta-table,
.fi-resource-list-records-page .fi-ta-table > thead {
    border-top: 0 !important;
}

.fi-resource-list-records-page .fi-ta-table > thead > tr {
    border-top: 0;
    background: var(--collection-bg);
}

.fi-resource-list-records-page .fi-ta-table > thead > tr > th {
    position: sticky;
    z-index: 5;
    top: 0;
    border-top: 0;
    background: var(--collection-bg);
    box-shadow: inset 0 -1px var(--collection-border);
}

.fi-resource-list-records-page .fi-ta-header-cell {
    padding-block: 0.625rem;
    font-weight: 500;
    line-height: 1.5rem;
}

.fi-resource-list-records-page .fi-ta-header-cell-label {
    font-weight: 500;
}

.fi-resource-list-records-page .fi-ta-row {
    --collection-table-row-bg: var(--collection-bg);

    background: var(--collection-table-row-bg);
    color: var(--collection-text);
}

.fi-resource-list-records-page .fi-ta-row:hover,
.fi-resource-list-records-page .fi-ta-row.fi-selected {
    --collection-table-row-bg: var(--collection-hover);
}

/* Grayed-out rows darken on hover rather than staying washed out. */
.collection-grid-table .fi-ta-row:hover .collection-grid-row-style-muted {
    color: var(--collection-muted-hover);
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-row
    > .fi-ta-cell {
    background: var(--collection-table-row-bg);
}

.fi-resource-list-records-page .collection-grid-table .fi-ta-cell {
    vertical-align: top;
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-cell {
    vertical-align: middle;
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-text:not(.fi-inline),
.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-icon {
    align-items: center;
    padding-block: 0.5rem;
}

.fi-resource-list-records-page .fi-ta-text {
    line-height: 1.5rem;
}

.fi-resource-list-records-page .fi-ta-cell:has(.fi-ta-actions) {
    padding-block: 0.5rem;
}

.fi-resource-list-records-page .fi-ta-cell:has(.fi-ta-record-checkbox),
.fi-resource-list-records-page .fi-ta-selection-cell {
    padding-block: 0.5rem;
}

.fi-resource-list-records-page
    .fi-ta-table
    > tbody
    > .fi-ta-row
    > .fi-ta-cell:first-child
    .fi-ta-text-item,
.fi-resource-list-records-page
    .fi-ta-table
    > tbody
    > .fi-ta-row
    > .fi-ta-selection-cell
    + .fi-ta-cell
    .fi-ta-text-item {
    font-weight: 500;
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-table
    > tbody
    > tr
    > :first-child {
    position: relative;
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-table
    > thead
    > tr
    > :first-child::before,
.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-table
    > tbody
    > tr
    > :first-child::before {
    position: absolute;
    top: 0;
    right: 100%;
    bottom: -1px;
    width: var(--collection-main-inline-gutter);
    border-bottom: 1px solid var(--collection-border);
    background: var(--collection-table-row-bg, var(--collection-bg));
    content: "";
    pointer-events: none;
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-table
    > thead
    > tr
    > .fi-ta-header-cell:first-child {
    padding-inline-start: 0;
}

.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-table
    > tbody
    > tr
    > .fi-ta-cell:first-child:not(.fi-ta-selection-cell),
.fi-resource-list-records-page
    .fi-ta-ctn:not(.collection-grid-table)
    .fi-ta-table
    > tbody
    > tr
    > .fi-ta-cell:first-child:not(.fi-ta-selection-cell)
    .fi-ta-text:not(.fi-inline) {
    padding-inline-start: 0;
}

/* The loading bar: 2px along the top of the window, moving the way a thing
   with weight does. It is thrown from the left edge and coasts, losing speed
   the whole way toward nine-tenths of the width, so it never stops and never
   arrives early. When the work is done it is not faded out: it gathers speed
   again and carries on off the right edge, its tail following it out. */
.collection-loading-bar {
    position: fixed;
    z-index: 100;
    inset: 0 0 auto;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
}

.collection-loading-bar[hidden] {
    display: none;
}

.collection-loading-bar-fill {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--collection-loading-bar);
}

/* Thrown, pushed, then coasting. The curve is not drawn by eye: it is a
   mass given a shove and let go against drag, integrated and sampled here,
   which is why the speeds along it hang together.

   The weight is in where the speed peaks. It used to peak inside the first
   eighth of a second and bleed off from there -- quick off the mark, and
   over almost as soon, which reads as something light. Now the push keeps
   working for the better part of half a second, so the bar is still
   gaining speed at 400ms and only crosses the middle of the window at
   about 700ms, where it used to be there in 300. It still shows about a
   twentieth of the window within 60ms, so a short wait is answered at
   once; what changed is that it goes on building instead of giving up.

   From 1.2s it hands over to the coast this bar already had, untouched, so
   it still never stops and never arrives early. The first line is for
   browsers that cannot read the drawn curve. */
.collection-loading-indicator-visible > .collection-loading-bar-fill {
    transform: scaleX(0.9);
    transition: transform 8s cubic-bezier(0.3, 0.5, 0.1, 1);
    transition-timing-function: linear(
        0, 0.022 0.375%, 0.044 0.75%, 0.072 1.25%, 0.107 1.875%,
        0.159 2.75%, 0.225 3.75%, 0.313 5%, 0.414 6.5%, 0.509 8.25%,
        0.595 10.25%, 0.669 12.5%, 0.729 15%, 0.765 19.5%, 0.805 26%,
        0.85 35%, 0.895 47%, 0.94 62%, 0.975 79%, 1
    );
}

/* Leaving: full width and one whole width to the right, so the leading edge
   crosses the window and the tail follows it off.

   The curve said it began at the speed the bar had been coasting at, and
   did not: a bezier whose first handle sits at y=0 leaves the gate at a
   standstill, so the bar stopped dead, waited, and then shot off. It is
   now the same kind of curve as the arrival -- a body already moving, with
   a push that ramps in -- so it picks up where the coast left off and
   keeps gaining the whole way out. It takes longer about it: a third of
   the time to cover a tenth of the distance, and the last half of the
   distance inside the final fifth. The 650ms is paired with the timer in
   collection-grid.js that takes the bar away afterwards. */
.collection-loading-bar-done > .collection-loading-bar-fill {
    transform: translateX(100%) scaleX(1);
    transition: transform 650ms cubic-bezier(0.45, 0.1, 0.85, 0.5);
    transition-timing-function: linear(
        0, 0.025 10%, 0.056 20%, 0.096 30%, 0.166 42%, 0.276 55%,
        0.43 68%, 0.612 80%, 0.793 90%, 1
    );
}


.collection-grid-table-header-cell,
.collection-grid-table-cell,
.collection-grid-table-header-cell > .fi-ta-col,
.collection-grid-table-cell > .fi-ta-col {
    padding: 0 !important;
}

.collection-grid-table-cell {
    position: relative;
}

.collection-grid-table-cell::before {
    box-sizing: border-box;
    position: absolute;
    z-index: 0;
    top: 0;
    right: 100%;
    bottom: 0;
    width: var(--collection-main-inline-gutter);
    border-bottom: 1px solid var(--collection-border);
    background: var(--collection-bg);
    content: "";
    pointer-events: none;
}

.collection-grid-table-header-cell::before {
    position: absolute;
    top: 0;
    right: 100%;
    bottom: 0;
    width: var(--collection-main-inline-gutter);
    /* Covers the gutter beside the pinned headings so rows do not show
       through it. It carries no rule: the rule under the headings starts
       where their text does. */
    background: var(--collection-bg);
    content: "";
    pointer-events: none;
}

.collection-grid-table .fi-ta-content-ctn {
    max-height: none;
    overflow: visible;
}

.collection-grid-table:not(.collection-grid-layout-server-ready):not(
        .collection-grid-layout-client-ready
    )
    .fi-ta-content-ctn {
    visibility: hidden;
}

.fi-resource-create-record-page .fi-page-content,
.fi-resource-edit-record-page .fi-page-content {
    padding-inline: 0.75rem;
    padding-bottom: calc(var(--collection-footer-height) + 2rem);
}

.fi-resource-create-record-page .fi-sc-actions.fi-sticky .fi-ac,
.fi-resource-edit-record-page .fi-sc-actions.fi-sticky .fi-ac {
    right: 0;
    bottom: 0;
    left: var(--sidebar-width);
    width: auto !important;
    min-height: var(--collection-footer-height);
    margin: 0;
    align-items: center;
    border-top: 1px solid var(--collection-border);
    border-radius: 0;
    background: var(--collection-bg);
    box-shadow: none;
    padding-inline:
        calc(var(--collection-main-inline-gutter) + 0.75rem)
        var(--collection-main-inline-gutter);
}

.collection-grid-table-header-cell {
    position: sticky;
    z-index: 5;
    top: 0;
    background: var(--collection-bg) !important;
    box-shadow: none;
}

/* The rule under the column headings is drawn by the heading row itself, not
   by the table cell around it, so that it starts where the headings' text
   starts -- exactly as the rules between rows do -- instead of running out
   to the edge of the page. */
.collection-grid-table .fi-ta-table > thead,
.collection-grid-table .fi-ta-table > thead > tr,
.collection-grid-table .fi-ta-table > thead > tr > th {
    border: 0 !important;
    box-shadow: none;
}

.collection-grid-header {
    position: relative;
}

.collection-grid-header::after {
    position: absolute;
    bottom: 0;
    inset-inline: var(--collection-header-rule-inset, 0) 0;
    border-bottom: 1px solid var(--collection-border);
    content: "";
    pointer-events: none;
}

.collection-grid {
    display: grid;
    grid-template-columns: var(--collection-grid-template);
    min-width: max-content;
}

.collection-grid-header {
    color: var(--collection-muted-dark);
    font-size: var(--collection-grid-header-font-size);
    font-weight: 500;
}

/* The page-wide 16px rule above names span and button directly, so setting a
   size on the header or a row is not enough: their contents have to be told
   to inherit it. Same specificity as that rule, and later, so this wins. */
.collection-grid-header :where(span, button),
.collection-grid-row :where(span, div, a, label, input, select, textarea) {
    font-size: inherit;
}

.collection-grid-header .collection-grid-header-data-cell {
    position: relative;
    cursor: grab;
    overflow: visible;
    padding-inline-end: 0.125rem;
    touch-action: none;
    user-select: none;
}

.collection-grid-header-data-cell:active,
.collection-grid-column-dragging {
    cursor: grabbing;
}

.collection-grid-column-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.collection-grid-column-resize {
    position: absolute;
    z-index: 6;
    top: 0;
    right: -0.25rem;
    bottom: 0;
    width: 0.5rem;
    cursor: col-resize;
    touch-action: none;
}

.collection-grid-column-resize::after {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    bottom: 0.5rem;
    width: 3px;
    background: var(--collection-accent);
    content: "";
    opacity: 0;
    transform: translateX(-50%);
}

.collection-grid-column-resize:hover::after {
    opacity: 0.65;
}

.collection-grid-column-dragging {
    opacity: 0.45;
}

.collection-grid-column-drop-before {
    box-shadow: inset 2px 0 var(--collection-accent);
}

.collection-grid-column-drop-after {
    box-shadow: inset -2px 0 var(--collection-accent);
}

.collection-grid-is-resizing,
.collection-grid-is-resizing *,
.collection-grid-is-reordering,
.collection-grid-is-reordering * {
    user-select: none !important;
}

.collection-grid-is-resizing,
.collection-grid-is-resizing * {
    cursor: col-resize !important;
}

.collection-grid-is-reordering,
.collection-grid-is-reordering * {
    cursor: grabbing !important;
}

/* The edit panel is a Filament record action, and Filament gives every row a
   cell to hold its trigger. Clicking the row is the trigger here, so the cell
   and its heading are not shown. */
.collection-grid-table .fi-ta-cell:has(> .fi-ta-actions),
.collection-grid-table .fi-ta-actions-header-cell {
    display: none;
}

.collection-grid-row {
    /* How far the row reaches left of its cell to draw its own fill. Named
       rather than written into the margin, because the checkbox column
       has to know it: see the selecting rules near the end of this file. */
    --collection-grid-row-bleed: var(--collection-main-inline-gutter);

    align-items: stretch;
    color: var(--collection-text);
    cursor: pointer;
    font-size: var(--collection-grid-font-size);
    margin-inline-start: calc(0rem - var(--collection-grid-row-bleed));
    outline: none;
    padding-inline-start: var(--collection-main-inline-gutter);
}

@supports (content-visibility: auto) {
    .collection-grid-row {
        content-visibility: auto;
        contain-intrinsic-block-size: auto var(--collection-row-height);
    }

    .collection-grid-row-virtualized {
        content-visibility: hidden;
    }
}

.collection-grid-row-style-muted {
    color: var(--collection-muted);
}

.collection-grid-row-style-bold {
    font-weight: 500;
}

.collection-grid-row-style-red {
    color: var(--collection-status-red-text);
}

.collection-grid-row-style-green {
    color: var(--collection-status-green-text);
}

.collection-grid-row-style-muted .collection-grid-token,
.collection-grid-row-style-red .collection-grid-token,
.collection-grid-row-style-green .collection-grid-token {
    color: inherit;
}

/* On the name cell itself: the cell holds its text directly. (This rule
   used to name an inner wrapper that the row no longer has, so the line
   through deaccessioned items quietly stopped being drawn.) */
.collection-grid-row-style-strikethrough .collection-grid-cell-name {
    text-decoration: line-through;
}

.collection-grid-row-style-muted_background {
    --collection-row-fill: var(--collection-status-muted-background);
}

.collection-grid-row-style-red_background {
    --collection-row-fill: var(--collection-status-red-background);
}

.collection-grid-row-style-green_background {
    --collection-row-fill: var(--collection-status-green-background);
}

.fi-resource-items.fi-resource-list-records-page .collection-grid-header,
.collection-attribute-items-page .collection-grid-header {
    --collection-header-rule-inset: var(--collection-main-inline-gutter);

    padding-inline-start: var(--collection-main-inline-gutter);
}

.fi-resource-items.fi-resource-list-records-page .collection-grid-row,
.collection-attribute-items-page .collection-grid-row {
    --collection-grid-row-bleed: 0px;
}

/* One step lighter than --collection-cell-hover on the gray ramp (100 vs
   200), so hovering lifts the row instead of filling it. */
.collection-grid-table .fi-ta-row:hover .collection-grid-row {
    --collection-row-fill: var(--collection-token-bg);
}

/* A row's fill and the rule beneath it are both drawn by the row, inset to
   where its cells begin, rather than by the table cell around it, which runs
   to the edge of the page. So the rules stop short of the sides, and a
   hovered or open row is a rounded block sitting inside them. */
.collection-grid-table .fi-ta-table > tbody > .fi-ta-row,
.collection-grid-table .fi-ta-table > tbody > .fi-ta-row > .fi-ta-cell,
.collection-grid-table .fi-ta-table > tbody > .fi-ta-row:hover > .fi-ta-cell {
    border: 0;
    background: transparent;
}

.collection-grid-table .fi-ta-table > tbody > .fi-ta-row > .fi-ta-cell::before {
    content: none;
}

.collection-grid-row {
    position: relative;
    isolation: isolate;
}

.collection-grid-row::before,
.collection-grid-row::after {
    position: absolute;
    z-index: -1;
    inset-inline: calc(var(--collection-main-inline-gutter) - var(--collection-cell-pad-inline)) 0;
    content: "";
    pointer-events: none;
}

.collection-grid-row::before {
    inset-block: 0;
    border-radius: var(--collection-control-radius);
    background: var(--collection-row-fill, transparent);
}

/* The rule starts where the row's text starts, a cell's padding in from
   where its fill does. */
.collection-grid-row::after {
    bottom: 0;
    inset-inline-start: var(--collection-main-inline-gutter);
    border-bottom: 1px solid var(--collection-border);
}

/* No rule under a filled row, or under the row above one: the block's own
   edge is the division there.

   The row above is found by the script and given a class (see
   markRowAboveHover() and markPanelRow() in collection-grid.js), not by
   `:has(+ ...)`. A row that asks about its next sibling that way makes
   Safari re-ask every row in the table each time one is added or taken
   out -- about 30ms a row -- so filtering a list of 250 froze the page for
   ten seconds and more. Do not bring a sibling `:has()` back to any list
   of rows. */
.collection-grid-table .fi-ta-row:hover .collection-grid-row::after,
.collection-grid-table .fi-ta-row.collection-row-above-hover .collection-grid-row::after,
.collection-grid-table .fi-ta-row .collection-grid-row-selected::after,
.collection-grid-table .fi-ta-row .collection-grid-row-above-selected::after {
    border-bottom-color: transparent;
}

/* A cell is one line. Anything longer is cut with an ellipsis and can be
   read in the cell's tooltip or the edit panel, so every row is the same
   height and the list scans as a column of single lines. Block rather than
   flex: text-overflow has no effect on a flex container's own text. */
.collection-grid-cell {
    display: block;
    box-sizing: border-box;
    /* A fixed height, not a minimum: mixed weights on one line (a name and
       its lighter subtitle) can make the line box a pixel taller than the
       line-height asks for, and one such cell would grow its whole row. */
    height: var(--collection-row-height);
    overflow: hidden;
    padding:
        var(--collection-cell-pad-top)
        var(--collection-cell-pad-inline)
        var(--collection-cell-pad-bottom);
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-grid-header .collection-grid-cell {
    display: flex;
    align-items: flex-start;
    height: auto;
    min-height: var(--collection-grid-header-height);
    /* A pixel more above than below, which centres the label's capitals. */
    padding-block:
        calc((var(--collection-grid-header-height) - 1.25rem) / 2 + 1px)
        calc((var(--collection-grid-header-height) - 1.25rem) / 2 - 1px);
}

.collection-grid > .collection-grid-cell:first-child {
    margin-inline-start: -0.75rem;
}

/* The subtitle runs on from the name it belongs to, set lighter. */
.collection-grid-cell-subtitle {
    margin-inline-start: 0.25rem;
    color: var(--collection-muted);
    font-weight: 400;
}

.collection-grid-token-list {
    display: flex;
    min-width: 0;
    /* One line of tokens; any that do not fit are cut off at the cell's edge. */
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.1875rem;
    overflow: hidden;
}

.collection-grid-token {
    display: inline-flex;
    min-width: 0;
    min-height: 1.5rem;
    align-items: flex-start;
    gap: var(--collection-token-gap);
    border-radius: var(--collection-token-radius);
    background: var(--collection-token-bg);
    color: var(--collection-text);
    line-height: var(--collection-token-line);
    padding: var(--collection-token-pad-block) var(--collection-token-gap);
    flex: none;
    white-space: nowrap;
}

/* One step lighter than --collection-token-bg-on-strong (200 vs 300), matching
   the row hover moving up the ramp. Still clearly above the resting
   --collection-token-bg, so no half-step value is required. */
.collection-grid-table
    .fi-ta-row:hover
    .collection-grid-token {
    background: var(--collection-token-bg-on-subtle);
}

/* Pointing at one token within an already-hovered row takes it one step
   further again (200 -> 300), so the token under the cursor is picked out
   from its neighbours. */
.collection-grid-table
    .fi-ta-row:hover
    .collection-grid-token:hover {
    background: var(--collection-token-bg-on-strong);
}

.collection-grid-cell-name {
    font-weight: 500;
}

/* A token's own padding sits between the cell's edge and its text, so the
   cell gives that much back: an ordinary cell's padding less the token's
   --collection-token-pad-block on each side. That puts a token's text on the
   same line as the text in every other cell of the row, and a one-token cell
   comes to the same height as the rest.

   This was a fixed 7px/5px, which had the right idea but gave back 4px for a
   token that only takes 2px -- so token text rode 2px above its neighbours. */
.collection-grid-cell-token {
    padding-block:
        calc(var(--collection-cell-pad-top) - var(--collection-token-pad-block))
        calc(var(--collection-cell-pad-bottom) - var(--collection-token-pad-block));
}

/* An item's images, as a run of small squares. Each is a token's height with
   a token's corner, so a row of them reads as a row of tokens -- but they
   sit a pixel higher than tokens do, evenly between the row's two edges.
   A token is placed for the text inside it, to share a baseline with the
   cell beside it; a picture has no baseline to share. */
.collection-grid-cell-images.collection-grid-cell-token {
    padding-block: 0.5rem;
}

.collection-grid-cell-images .collection-grid-token-list {
    gap: 0.25rem;
}

.collection-grid-thumb {
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    border-radius: var(--collection-token-radius);
    /* What shows until the picture arrives, and behind one that never does. */
    background: var(--collection-token-bg-on-subtle);
    object-fit: cover;
}

/* The count of those not shown is a token the size of one square, set a
   size smaller than the grid's text and fainter: it is the least of what
   the row says. With nothing to count it has no words, and is not there. */
.collection-grid-thumb-more {
    min-width: 1.5rem;
    justify-content: center;
    padding-inline: 0.25rem;
    color: var(--collection-faint);
    font-size: 0.875rem;
}

.collection-grid-thumb-more:empty {
    display: none;
}

/* As many squares as the column has room for, and the count for the rest.

   The row is given every square, and how many of them the column has room
   for as `data-shown` on the run -- by the server when the row is drawn
   (ItemRowRenderer::thumbsShown) and again by the script whenever the
   column's width changes (collection-grid.js, fitThumbs). All that is left
   to do here is hide the squares past that number.

   This was first done wholly here, with a container query on every cell
   and a counter for the count. In use the count did not redraw as squares
   came and went, and dragging a column was slow; neither showed in
   Chromium. Nothing here now depends on either. */
.collection-grid-thumbs[data-shown="0"] > .collection-grid-thumb,
.collection-grid-thumbs[data-shown="1"] > .collection-grid-thumb:nth-child(n + 2),
.collection-grid-thumbs[data-shown="2"] > .collection-grid-thumb:nth-child(n + 3),
.collection-grid-thumbs[data-shown="3"] > .collection-grid-thumb:nth-child(n + 4),
.collection-grid-thumbs[data-shown="4"] > .collection-grid-thumb:nth-child(n + 5),
.collection-grid-thumbs[data-shown="5"] > .collection-grid-thumb:nth-child(n + 6),
.collection-grid-thumbs[data-shown="6"] > .collection-grid-thumb:nth-child(n + 7),
.collection-grid-thumbs[data-shown="7"] > .collection-grid-thumb:nth-child(n + 8),
.collection-grid-thumbs[data-shown="8"] > .collection-grid-thumb:nth-child(n + 9),
.collection-grid-thumbs[data-shown="9"] > .collection-grid-thumb:nth-child(n + 10),
.collection-grid-thumbs[data-shown="10"] > .collection-grid-thumb:nth-child(n + 11),
.collection-grid-thumbs[data-shown="11"] > .collection-grid-thumb:nth-child(n + 12),
.collection-grid-thumbs[data-shown="12"] > .collection-grid-thumb:nth-child(n + 13),
.collection-grid-thumbs[data-shown="13"] > .collection-grid-thumb:nth-child(n + 14),
.collection-grid-thumbs[data-shown="14"] > .collection-grid-thumb:nth-child(n + 15),
.collection-grid-thumbs[data-shown="15"] > .collection-grid-thumb:nth-child(n + 16),
.collection-grid-thumbs[data-shown="16"] > .collection-grid-thumb:nth-child(n + 17),
.collection-grid-thumbs[data-shown="17"] > .collection-grid-thumb:nth-child(n + 18),
.collection-grid-thumbs[data-shown="18"] > .collection-grid-thumb:nth-child(n + 19),
.collection-grid-thumbs[data-shown="19"] > .collection-grid-thumb:nth-child(n + 20),
.collection-grid-thumbs[data-shown="20"] > .collection-grid-thumb:nth-child(n + 21),
.collection-grid-thumbs[data-shown="21"] > .collection-grid-thumb:nth-child(n + 22) {
    display: none;
}

/* A cell that says there is nothing says it quietly. */
.collection-grid-cell-empty {
    color: var(--collection-muted);
}

/* The larger picture that opens over a square the pointer has rested on
   (collection-grid.js, bindThumbPreview). A panel like a menu's: the same
   ground, corner, inset and shadow, with the picture where the entries
   would be. It is placed and sized by the script, and takes no part in what
   the pointer is over, so the squares under and around it still answer. */
.collection-thumb-preview {
    position: fixed;
    z-index: 120;
    visibility: hidden;
    padding: 0.25rem;
    border-radius: var(--collection-control-radius);
    background: var(--collection-bg);
    box-shadow: var(--collection-shadow-menu);
    opacity: 0;
    pointer-events: none;
    /* Closing: it draws back a little toward the square it came from (the
       script sets that point as the origin) and fades, quicker than it
       came. */
    transform: scale(0.95);
    transition:
        opacity 0.1s ease-in,
        transform 0.1s ease-in,
        visibility 0s 0.1s;
}

/* Opening is the keyframes below and nothing else: with no transition of
   its own, the panel is at its open size the moment the class is on, and
   the animation plays over that. Changing the picture for another of the
   same item changes neither the class nor the animation, so it does not
   pop again; the script takes the class off and puts it back when the
   panel moves to another item, which does. */
.collection-thumb-preview-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
    animation: collection-thumb-preview-pop 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* A little small, a touch past full size, and back. */
@keyframes collection-thumb-preview-pop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    60% {
        opacity: 1;
        transform: scale(1.015);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.collection-thumb-preview img {
    display: block;
    border-radius: var(--collection-token-radius);
    /* What shows until the picture arrives. */
    background: var(--collection-token-bg-on-subtle);
}

/* The border on the square the pointer is resting on: the wait before the
   panel opens, shown. It is laid over the square by the script, the
   square's size and with its corners, and is drawn as a shadow inside its
   own edge so that it has no size of its own to change.

   Filling: from nothing it thickens, at an even rate, to half the square's
   width -- which is the whole square -- in the time the script waits
   (--collection-thumb-wait, which it sets).

   On: the ring a focused field has, 2px of the accent. Let go from
   filling, as the panel opens, it eases back to that from the full
   square; moved from one square to the next it is already that, and
   nothing eases. */
.collection-thumb-ring {
    position: fixed;
    z-index: 119;
    visibility: hidden;
    border-radius: var(--collection-token-radius);
    box-shadow: inset 0 0 0 0 var(--collection-accent);
    pointer-events: none;
}

.collection-thumb-ring-filling,
.collection-thumb-ring-on {
    visibility: visible;
}

.collection-thumb-ring-filling {
    animation: collection-thumb-ring-fill var(--collection-thumb-wait, 1s) linear forwards;
}

.collection-thumb-ring-on {
    box-shadow: inset 0 0 0 2px var(--collection-accent);
}

.collection-thumb-ring-let-go {
    animation: collection-thumb-ring-let-go 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes collection-thumb-ring-fill {
    to {
        box-shadow: inset 0 0 0 0.75rem var(--collection-accent);
    }
}

@keyframes collection-thumb-ring-let-go {
    from {
        box-shadow: inset 0 0 0 0.75rem var(--collection-accent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-thumb-preview,
    .collection-thumb-preview-open {
        transform: none;
        transition: none;
        animation: none;
    }

    /* The wait is still a second; the border is simply there for it. */
    .collection-thumb-ring-filling {
        box-shadow: inset 0 0 0 2px var(--collection-accent);
        animation: none;
    }

    .collection-thumb-ring-let-go {
        animation: none;
    }
}

.collection-grid-cell-money {
    text-align: right;
}

/* A column of "No" is a column of noise, so at rest a boolean shows a mark
   for yes and nothing for no. The word stays in the cell -- a screen reader
   still reads it and the tooltip still says it -- it is only given no size.
   The mark takes the row's colour, so it greys with a greyed row. */
.collection-grid-cell-boolean {
    font-size: 0;
    /* The hidden word would otherwise still take a line under the mark. */
    line-height: 0;
}

.collection-grid-cell-boolean[data-value="true"]::before {
    display: block;
    width: 0.75rem;
    height: 1.25rem;
    background: currentColor;
    content: "";
    -webkit-mask: var(--collection-check-mark-image) center / 0.75rem 0.75rem no-repeat;
    mask: var(--collection-check-mark-image) center / 0.75rem 0.75rem no-repeat;
}

[data-collection-creatable-tags] {
    position: relative;
}

.collection-create-tag-option {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.25rem);
    left: 0;
    width: 100%;
    border: 1px solid var(--collection-border);
    border-radius: 0.25rem;
    background: var(--collection-bg);
    padding: 0.625rem 0.75rem;
    color: var(--collection-text);
    text-align: left;
}

.collection-create-tag-option:hover,
.collection-create-tag-option:focus-visible {
    background: var(--collection-hover);
    outline: none;
}

.collection-grid-actions {
    display: flex;
    min-height: var(--collection-row-height);
    align-items: center;
    justify-content: flex-end;
    gap: 0.125rem;
    padding: 0 0.375rem;
}

.collection-grid-sort-button {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    font: inherit;
    text-align: left;
}

.collection-grid-sort-button .collection-grid-column-label {
    width: auto;
    flex: 0 1 auto;
}

.collection-grid-sort-button:focus-visible {
    outline: 2px solid var(--collection-accent);
    outline-offset: 2px;
}

.collection-grid-sort-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex: 0 0 auto;
    color: var(--collection-muted);
    opacity: 0;
}

.collection-grid-sort-icon-direction {
    display: none;
}

.collection-grid-sort-button:not([data-sort-direction]):hover
    .collection-grid-sort-icon-neutral,
.collection-grid-sort-button:not([data-sort-direction]):focus-visible
    .collection-grid-sort-icon-neutral {
    opacity: 1;
}

.collection-grid-sort-button[data-sort-direction]
    .collection-grid-sort-icon-neutral {
    display: none;
}

.collection-grid-sort-button[data-sort-direction]
    .collection-grid-sort-icon-direction {
    display: block;
    opacity: 1;
}

.collection-grid-sort-button[data-sort-direction="desc"]
    .collection-grid-sort-icon-direction {
    transform: rotate(180deg);
}

@media (min-width: 1024px) {
    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-content-ctn {
        width: calc(
            100% + var(--collection-main-inline-gutter) +
                var(--collection-main-inline-gutter)
        );
        margin-inline: calc(0rem - var(--collection-main-inline-gutter));
    }

    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-table
        > thead
        > tr
        > :first-child::before,
    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-table
        > tbody
        > tr
        > :first-child::before {
        display: none;
    }

    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-table
        > thead
        > tr
        > .fi-ta-header-cell:first-child,
    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-table
        > thead
        > tr
        > .fi-ta-selection-cell:first-child,
    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-table
        > tbody
        > tr
        > .fi-ta-selection-cell:first-child {
        padding-inline-start: var(--collection-main-inline-gutter);
    }

    .fi-resource-list-records-page
        .fi-ta-ctn:not(.collection-grid-table)
        .fi-ta-table
        > tbody
        > tr
        > .fi-ta-cell:first-child:not(.fi-ta-selection-cell)
        .fi-ta-text:not(.fi-inline) {
        padding-inline-start: var(--collection-main-inline-gutter);
    }

    .fi-resource-list-records-page > .fi-page-header-main-ctn,
    .collection-items-page > .fi-page-header-main-ctn {
        padding-top: var(--collection-header-height);
    }

    .fi-resource-list-records-page > .fi-page-header-main-ctn > .fi-header,
    .collection-items-page > .fi-page-header-main-ctn > .fi-header {
        position: fixed;
        inset-inline: var(--sidebar-width) 0;
        top: 0;
        width: auto;
        margin-inline-start: 0;
    }

    /* Fixed, so it does not inherit the header band's padding the way the
       title and the page actions do; the inset is added here instead to keep
       all of them on the same line. */
    .fi-resource-list-records-page .fi-ta-header-toolbar,
    .collection-items-page .fi-ta-header-toolbar {
        position: fixed;
        /* Centred in the header band, whatever its height. */
        top: calc((var(--collection-header-height) + var(--collection-header-top-inset) - var(--collection-control-height)) / 2);
        right: calc(
            var(--collection-main-inline-gutter)
            + var(--collection-header-actions-width, 6rem)
            + var(--collection-toolbar-clearance)
        );
        display: flex;
        width: auto;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        gap: var(--collection-toolbar-gap);
        visibility: visible;
    }







    .fi-resource-list-records-page .fi-ta-filter-indicators,
    .collection-items-page .fi-ta-filter-indicators {
        box-sizing: border-box;
        position: fixed;
        z-index: 12;
        top: var(--collection-header-height);
        right: 0;
        left: var(--sidebar-width);
        width: auto;
        height: var(--collection-filter-bar-height);
        margin-inline-start: 0;
    }

    .fi-resource-list-records-page
        .fi-ta-main:has(> .fi-ta-filter-indicators),
    .collection-items-page
        .fi-ta-main:has(> .fi-ta-filter-indicators) {
        padding-top: var(--collection-filter-bar-height);
    }

    /* The gap between the fixed page header and the first row belongs to the
       header cell itself, not to the container above it. Carried as the cell's
       own opaque top padding, the cell can pin flush against the header band
       jumps when it sticks (its content sits at the same offset either way)
       nor leaves a transparent strip for rows to scroll through. The padding
       needs !important to beat the blanket `padding: 0 !important` that
       strips Filament's cell padding from the grid. */
    .fi-resource-list-records-page .fi-ta-table > thead > tr > th,
    .collection-grid-table-header-cell {
        top: var(--collection-header-height);
        padding-top: var(--collection-grid-sticky-offset) !important;
    }

    .fi-resource-list-records-page
        .fi-ta-main:has(> .fi-ta-filter-indicators)
        .fi-ta-table
        > thead
        > tr
        > th,
    .fi-ta-main:has(> .fi-ta-filter-indicators)
        .collection-grid-table-header-cell {
        top: calc(var(--collection-header-height) + var(--collection-filter-bar-height));
    }

    .fi-resource-list-records-page .fi-header-actions-ctn,
    .collection-items-page .fi-header-actions-ctn {
        min-width: 0;
        flex: 1 1 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: var(--collection-toolbar-gap);
    }

    .fi-resource-list-records-page .fi-ta-header-toolbar > :last-child,
    .collection-items-page .fi-ta-header-toolbar > :last-child {
        display: flex;
        width: auto;
        flex: 0 0 auto;
        align-items: center;
        gap: var(--collection-toolbar-gap);
    }

    .fi-resource-list-records-page .fi-ta-header-toolbar > .fi-ta-actions,
    .collection-items-page .fi-ta-header-toolbar > .fi-ta-actions {
        gap: var(--collection-toolbar-gap);
    }

    .fi-resource-list-records-page .fi-header-actions-ctn > .fi-ac,
    .collection-items-page .fi-header-actions-ctn > .fi-ac {
        width: auto;
        flex: 0 0 auto;
    }

    .fi-resource-list-records-page
        .fi-ta-header-toolbar
        .collection-filter-button,
    .collection-items-page
        .fi-ta-header-toolbar
        .collection-filter-button {
        display: flex;
        width: var(--collection-control-height);
        min-width: var(--collection-control-height);
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        padding-inline: 0;
    }

    .fi-resource-list-records-page
        .fi-ta-header-toolbar
        .collection-filter-button.collection-filter-button-has-count,
    .collection-items-page
        .fi-ta-header-toolbar
        .collection-filter-button.collection-filter-button-has-count {
        width: auto;
        min-width: 3.5rem;
        padding-inline: 0.75rem;
    }

    .collection-filter-count {
        color: inherit;
        font-weight: 400;
        line-height: 1;
    }

    .collection-grid-table .fi-pagination,
    .fi-resource-list-records-page .fi-ta-main > .fi-pagination {
        position: fixed;
        inset-inline: var(--sidebar-width) 0;
        width: auto;
        margin-inline-start: 0;
    }

    .collection-grid-table .fi-ta-main,
    .fi-resource-list-records-page .fi-ta-main {
        padding-bottom: var(--collection-footer-height);
    }
}

@media (max-width: 1023px) {
    /* The menu button no longer takes a strip of its own above the page, so
       the layout starts at the top of the window and has the whole of it. */
    .fi-layout,
    .fi-layout > .fi-main-ctn {
        height: 100dvh;
    }

    .fi-layout > .fi-main-ctn {
        min-height: 100dvh !important;
    }

    /* ---- The header on a narrow window --------------------------------

       Three things had a line each -- the menu button, the title, the create
       button -- and all three were centred, which on a phone read as a
       stack of unrelated pieces rather than a header.

       They are two lines now. The title takes the first with the menu
       button at its end; the count, the controls and the create button
       share the second. It is the same arrangement the wide window has,
       with the title lifted onto a line of its own because there is no
       room for it beside them.

       Filament puts the menu button in a strip of its own, a sibling of the
       whole layout, so it cannot be laid out with the title. It is taken out
       of the flow and set where the title's line ends instead. It stays
       where it is while the page scrolls, as it already did. */
    .fi-layout-sidebar-toggle-btn-ctn {
        position: absolute;
        z-index: 30;
        /* Centred on the title's first line. On the first rather than on
           the band, because a long title takes a second one and the band
           grows under it while this stays where the title begins. */
        inset-block-start: calc(
            var(--collection-header-top-inset)
            + (3.25rem - var(--collection-control-height)) / 2
        );
        inset-inline-end: var(--collection-main-inline-gutter);
        width: auto;
        height: auto;
        padding: 0;
    }

    /* Nothing is reserved above the page any more, so once the list has
       moved its rows pass under this button. It takes a ground then -- the
       one every other icon button has -- and reads as a button over the
       list rather than a glyph lost in it. At rest, with the band behind
       it, it has none. (bindSidewaysScrollFlag sets the class.) */
    .fi-layout-sidebar-toggle-btn {
        transition: background-color 0.15s ease-out;
    }

    .collection-main-scrolled-y .fi-layout-sidebar-toggle-btn {
        border-radius: var(--collection-control-radius);
        background: var(--collection-button-tertiary-bg);
    }

    /* Every page's band, not only the ones with a list: Filament stacks the
       title and the page's buttons in a centred column on a narrow window,
       and a title centred over a left-aligned page reads as a stray. */
    .fi-page-header-main-ctn > .fi-header {
        flex-direction: row;
        flex-wrap: wrap;
        /* The title starts at the top of the band rather than being centred
           in it, so its first line is in the same place whether it takes one
           line or two -- which is what lets the menu button be set against
           that line once. */
        align-items: flex-start;
        /* A breath under a title that has taken two lines. One that fits on
           a single line does not need it -- the band's own height already
           leaves more than this below -- so it changes nothing there. */
        padding-block-end: 0.75rem;
    }


    /* The title has the line to itself, so a page's buttons come below it
       rather than running under the menu button. (The script only fits the
       title to the toolbar when the two share a line, which here they do
       not.)

       The room for the menu button is kept here rather than on the band,
       because a record's page clears the band's padding on both sides with
       a selector of its own and would have to be outranked. It belongs to
       the title in any case: it is the title the button has to clear. */
    .fi-page-header-main-ctn > .fi-header > :first-child {
        min-width: 0;
        flex: 1 1 100%;
        padding-inline-end: calc(
            var(--collection-main-inline-gutter)
            + var(--collection-control-height)
            + 0.75rem
        );
    }

    .fi-page-header-main-ctn > .fi-header > .fi-header-actions-ctn {
        justify-content: flex-start;
    }

    /* A heading built as "Section / Record" is a row that does not wrap, and
       the section never gives way on a wide window. Here there is no width
       to spare -- a collection's name alone can be wider than the band --
       so the section is cut like the record is, rather than carrying on
       under the menu button. */
    .fi-header-heading .collection-section-record-heading {
        max-width: 100%;
    }

    .collection-section-record-heading-link {
        min-width: 0;
        flex: 0 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* A long one takes a second line rather than being cut: on a wide
       window the cut has a tooltip behind it with the rest, and a phone has
       no pointer to hover. Two lines and no more, so the list is not pushed
       off the bottom of the window by a name.

       Not on a heading that is already laid out as "Section / Record",
       which is a flex row of its own and would be broken by the box this
       needs. */
    .fi-header-heading:not(:has(.collection-section-record-heading)) {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    /* The create button leaves the title's line and joins the controls on
       the one below, at its end. Offset from the bottom of the band rather
       than by a figure of its own, so it follows the band's height. */
    .fi-resource-list-records-page
        > .fi-page-header-main-ctn
        > .fi-header
        > .fi-header-actions-ctn,
    .collection-items-page
        > .fi-page-header-main-ctn
        > .fi-header
        > .fi-header-actions-ctn {
        position: absolute;
        z-index: 14;
        top: calc(100% + 0.75rem);
        inset-inline-end: var(--collection-main-inline-gutter);
        width: auto;
    }

    .fi-sidebar {
        border-inline-end: 0;
    }

    /* The controls' line. It keeps clear of the create button sitting at its
       end, by the width the script measures off that button (see
       syncToolbarOffset) -- the same figure the wide window reserves. */
    .fi-resource-list-records-page .fi-ta-header-toolbar,
    .collection-items-page .fi-ta-header-toolbar {
        position: static;
        width: 100%;
        /* A narrow enough window cannot hold the count, three controls and
           the create button on one line. Rather than squeeze them until
           they sit on top of each other, the controls drop to a line of
           their own; the create button stays where it is, since it is
           placed against the band above and not against this row. */
        flex-wrap: wrap;
        border-bottom: 1px solid var(--collection-border);
        padding-block: 0.75rem;
        padding-inline:
            var(--collection-main-inline-gutter)
            calc(
                var(--collection-main-inline-gutter)
                + var(--collection-header-actions-width, 6rem)
                + var(--collection-toolbar-clearance)
            );
    }

    .fi-resource-items.fi-resource-list-records-page .fi-ta-header-toolbar {
        right: auto;
    }

    /* The count stands alone at the start of the line and everything that
       can be pressed gathers at its end, beside the create button.

       Filament hands the toolbar two groups -- the count with the column
       button, then the filter and the search -- so the column button is
       tied to the count and cannot join the others. The groups are boxes
       with nothing on them, no padding, no ground, so they are dropped and
       their contents become the toolbar's own: four things on one line,
       which can then be ordered and wrapped as four rather than as two. */
    .fi-resource-list-records-page .fi-ta-header-toolbar > .fi-ta-actions,
    .collection-items-page .fi-ta-header-toolbar > .fi-ta-actions,
    .fi-resource-list-records-page .fi-ta-header-toolbar > :last-child,
    .collection-items-page .fi-ta-header-toolbar > :last-child {
        display: contents;
    }

    .fi-resource-list-records-page .fi-ta-header-toolbar,
    .collection-items-page .fi-ta-header-toolbar {
        justify-content: flex-end;
        gap: var(--collection-toolbar-gap);
    }

    /* The margin takes whatever is left over on the line, which is what
       holds the count at the start and gathers the buttons at the end. It
       does not decide where the line breaks, so it cannot push the buttons
       onto a second line on its own. The count is never broken across two. */
    .fi-resource-list-records-page .fi-ta-header-toolbar .collection-items-count,
    .collection-items-page .fi-ta-header-toolbar .collection-items-count {
        margin-inline-end: auto;
        white-space: nowrap;
    }

    .fi-resource-create-record-page .fi-sc-actions.fi-sticky .fi-ac,
    .fi-resource-edit-record-page .fi-sc-actions.fi-sticky .fi-ac {
        left: 0;
    }

    /* The search sizes to itself here as it does on a wide window: a
       magnifier the size of the buttons beside it until it is opened. It
       had been given a fixed 15rem, which as a line of its own was most of
       the row's width and pushed itself onto a second line while still
       shut. */
    .fi-resource-list-records-page .fi-ta-search-field,
    .collection-items-page .fi-ta-search-field {
        width: auto;
        flex: 0 0 auto;
    }

    /* Opened, it has to stay inside a row it shares with three other
       things, so the field it grows into is shorter than on a wide one. */
    .fi-resource-list-records-page .fi-ta-search-field:focus-within .fi-input,
    .fi-resource-list-records-page .fi-ta-search-field.collection-search-open .fi-input,
    .collection-items-page .fi-ta-search-field:focus-within .fi-input,
    .collection-items-page .fi-ta-search-field.collection-search-open .fi-input {
        width: 9rem;
    }

}

/* Narrower than about a 26rem window there is no room on one line for the
   count, the three controls and the create button: the count and the
   button hold the line and the controls come down to the next. Left to
   wrap on their own the controls broke wherever they ran out -- one button
   below, two above -- which reads as a mistake rather than a second row.

   The figure is a judgement, not a measurement: how much room the create
   button takes depends on its label, which differs from page to page, so
   there is no width at which this is exactly true everywhere. It is set
   wide enough that the row is never crowded rather than tight enough that
   it never breaks early. */
@media (max-width: 26rem) {
    .fi-resource-list-records-page .fi-ta-header-toolbar .collection-items-count,
    .collection-items-page .fi-ta-header-toolbar .collection-items-count {
        flex: 1 1 100%;
        /* The count is a link, and so a flex box of its own: given the whole
           line it centred its words in it. */
        justify-content: flex-start;
        margin-inline-end: 0;
    }
}

/* The gap above the first row is now the sticky header cell's own top padding
   (see --collection-grid-sticky-offset), so the container must not add it a
   second time -- that inset was what made the header jump when it stuck. */
@media (min-width: 1024px) {
    .fi-resource-list-records-page .fi-ta-content-ctn,
    .collection-items-page .fi-ta-content-ctn {
        padding-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* No travelling: the bar is simply there while loading, and goes. */
    .collection-loading-indicator-visible > .collection-loading-bar-fill {
        transform: scaleX(1);
        transition: none;
    }

    .collection-loading-bar-done > .collection-loading-bar-fill {
        transform: scaleX(1);
        opacity: 0;
        transition: opacity 200ms ease;
    }
}

/* A token that leads to the list of items sharing it (see
   ItemRowRenderer::tokenLinks). It looks like any other token; only the
   pointer says it goes somewhere. */
a.collection-grid-token {
    text-decoration: none;
    cursor: pointer;
}

.collection-simple-list-link {
    color: inherit;
    text-decoration: none;
}


/* These pages have no header button for the toolbar to leave room for. */
/* ...only the star, which is one control wide. */
.collection-attribute-items-page .fi-ta-header-toolbar {
    right: calc(var(--collection-main-inline-gutter) + var(--collection-control-height) + var(--collection-toolbar-clearance));
}

/* ...except a designer's, client's or source's, which has Edit there. */
/* Edit, a gap, and the star. */
.collection-record-items-page .fi-ta-header-toolbar {
    right: calc(var(--collection-main-inline-gutter) + 3.375rem + var(--collection-toolbar-gap) + var(--collection-control-height) + var(--collection-toolbar-clearance));
}

/* All Items has the star only while it is filtered or searched (see
   SavedViewActions). When it is there the toolbar moves over for it:
   Add Item, the header's gap between buttons, and the star. */
.fi-resource-items.fi-resource-list-records-page:has(.fi-header .collection-favorite-toggle) .fi-ta-header-toolbar {
    right: calc(var(--collection-main-inline-gutter) + 5.6875rem + 0.75rem + var(--collection-control-height) + var(--collection-toolbar-clearance));
}

/* Row checkboxes stay out of the way until Select is switched on (see
   SelectRowsAction), so a list with bulk actions looks like one without. */
html:not(.collection-selecting) .fi-ta-table .fi-ta-selection-cell {
    display: none;
}

/* ---- Ticking rows in the compact grid --------------------------------

   The grid draws its own row: one cell holding a CSS grid, with the fill
   and the rule beneath it drawn by the row rather than by the cell, and
   the row reaching a gutter's width left of its cell so that fill can
   start before its columns do.

   Filament's checkbox arrives in a cell of its own, before that one --
   which the reach then lies on top of, so the checkbox could be seen and
   not clicked. The cell is lifted over it instead: the row's fill and
   rule are pseudo-elements that take no clicks, and the cell above them
   is where the click lands.

   Then the fill and the rule are told to start at the checkbox rather
   than at the first column, which is what makes the checkbox part of
   the row instead of something standing beside it. The figure they
   start from is measured back from the row to the checkbox and not
   from the cell: the cell's own width is the page's gutter on the list
   pages and not on the others, while the checkbox is always the same
   16px sitting the same 14px from the row. */
html.collection-selecting .collection-grid-table .fi-ta-table > * > tr > .fi-ta-selection-cell {
    position: relative;
    /* Above the fill the row reaches over it with, so the checkbox is
       drawn on the block rather than under it -- and takes the click. */
    z-index: 1;
    padding-block: 0;
    padding-inline-end: 0.875rem;
    vertical-align: middle;
}

/* The gutter is inside these cells on the list pages, which is what puts
   the checkbox on the page's left edge there. A collection's own page
   keeps the gutter outside its table, so the cell's padding would push
   the checkbox a second gutter in -- past the count above it and the
   title above that. */
html.collection-selecting .collection-items-page .collection-grid-table .fi-ta-table > * > tr > .fi-ta-selection-cell {
    padding-inline-start: 0;
}

/* Measured back from the row to the checkbox's left edge: 14px of the
   cell's own padding and the 16px of checkbox. The fill and the rule
   start there, so that edge carries the count bar above it and the
   page's title above that, all down one line. */
.collection-grid-table {
    --collection-grid-selection-lead: 1.875rem;
}

html.collection-selecting .collection-grid-table .collection-grid-row::before,
html.collection-selecting .collection-grid-table .collection-grid-row::after {
    inset-inline-start: calc(
        var(--collection-grid-row-bleed) - var(--collection-grid-selection-lead)
    );
}

/* The block goes round the checkbox the way it goes round the text where
   there is no checkbox: a cell's padding past it, while the rule stays on
   the page's edge. */
html.collection-selecting .collection-grid-table .collection-grid-row::before {
    inset-inline-start: calc(
        var(--collection-grid-row-bleed) - var(--collection-grid-selection-lead) -
        var(--collection-cell-pad-inline)
    );
}

/* The heading row carries a grey fill of Filament's that every cell of
   this grid paints over. This one cell is Filament's own and did not, so
   the fill showed through it as a stripe down the left of the sort bar.
   The body's cells stay clear: what is behind them is the row's own
   block, which has to show. */
html.collection-selecting .collection-grid-table .fi-ta-table > thead > tr > .fi-ta-selection-cell {
    /* Pinned with the headings it belongs to. Filament's cell is not one
       of the cells this grid pins, so the sort bar held its place while
       the checkbox scrolled off it, leaving a hole at the left of the bar
       with the rows running through it.

       It sits a step under the headings' own cell, which is what lets
       the rule under the headings cross it: that rule starts at the
       checkbox, and an opaque cell above it would cut it off there. */
    position: sticky;
    z-index: 4;
    top: 0;
    background: var(--collection-bg);
}

/* The heading's rule runs the same width. */
html.collection-selecting .collection-grid-table .collection-grid-header {
    --collection-header-rule-inset: calc(0rem - var(--collection-grid-selection-lead));
}

/* The headings patch the gutter beside them, so that what shows there
   while rows pass under the pinned bar is the page and not the rows. The
   patch is measured back from the headings, a gutter's width -- and with
   Select on, what is back there is no longer the page's edge but the
   checkbox, which the patch then covers: all of it at the widest gutter,
   the right of it at a middling one, which is the sliver that was left.

   So the patch moves to the checkbox's own cell, where the gutter now
   actually is. */
html.collection-selecting .collection-grid-table .collection-grid-table-header-cell::before {
    content: none;
}

/* Where there is a page header to pin under, the checkbox is given the
   same offset the headings are, and the same opaque padding above, so
   that nothing scrolls through the gap between the two. */
@media (min-width: 1024px) {
    html.collection-selecting .collection-grid-table .fi-ta-table > thead > tr > .fi-ta-selection-cell {
        top: var(--collection-header-height);
        padding-top: var(--collection-grid-sticky-offset) !important;
    }

    html.collection-selecting
        .collection-grid-table
        .fi-ta-main:has(> .fi-ta-filter-indicators)
        .fi-ta-table
        > thead
        > tr
        > .fi-ta-selection-cell {
        top: calc(var(--collection-header-height) + var(--collection-filter-bar-height));
    }
}

html.collection-selecting .collection-grid-table .fi-ta-table > thead > tr > .fi-ta-selection-cell::before {
    position: absolute;
    /* Under the checkbox and over the cell's own background. A positioned
       pseudo-element otherwise paints above the cell's plain children, and
       this one, sitting flush against the checkbox, took the left edge off
       its ring. */
    z-index: -1;
    top: 0;
    right: 100%;
    bottom: 0;
    width: var(--collection-main-inline-gutter);
    background: var(--collection-bg);
    content: "";
    pointer-events: none;
}

/* A checkbox is something to click. */
.fi-body input[type="checkbox"]:not(:disabled) {
    cursor: pointer;
}

/* ---- The bulk edit panel ---------------------------------------------

   A rule above the switch, because what it asks is a different kind of
   question from the fields above it: those say what to set, this says
   what to do with what is already there. */
.collection-bulk-mode {
    border-top: 1px solid var(--collection-border);
    padding-top: 1.25rem;
}

/* The explanation belongs under the name of the thing it explains. Left
   alone it sits out at the field's own left edge, under the switch
   rather than under the word, so it is moved past the field's lead, the
   switch, and the gap that follows it. */
.collection-bulk-mode .fi-fo-field-content-col {
    margin-inline-start: calc(0.8125rem + 2.75rem + 0.75rem);
}

/* Select reads as switched on the way an open menu's button does. */
html.collection-selecting .fi-body .fi-ta-header-toolbar .fi-icon-btn.collection-select-rows {
    background: var(--collection-button-tertiary-selected-bg);
    color: var(--collection-button-tertiary-selected-text);
}

/* ---- The toolbar while Select is on ----------------------------------

   Filament counts what is ticked in a band of its own above the list,
   which pushed everything under it down the page the moment a row was
   ticked. The toolbar says it instead -- see SelectRowsAction -- and the
   band is taken off the screen but left in the page, where it is a live
   region a screen reader reads the count from. */
.fi-ta-selection-indicator {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* The count and the two beside it belong to Select, and are not there
   without it; the list's own total stands in that place at rest. */
html:not(.collection-selecting) .collection-selection-scope,
html.collection-selecting .collection-items-count {
    display: none;
}

/* The count is a sentence, not a button, and it is the one label in the
   app that is not set in title case: it is a number and a word. */
.collection-selection-count.fi-link {
    text-transform: none;
    cursor: default;
}

/* All and None read as plain words until they are pointed at, when they
   take the background a button has. */
.collection-selection-scope.fi-link:not(.collection-selection-count) {
    min-height: var(--collection-control-height);
    align-items: center;
    border-radius: var(--collection-control-radius);
    padding-inline: 0.75rem;
    color: var(--collection-text);
}

/* Filament sets a link's own label on the baseline, so that a link in a
   sentence sits on the sentence's line. These are not in a sentence but
   in a row of buttons, and left on the baseline the words rode at the
   top of the block behind them. */
.collection-selection-scope .fi-link-label {
    align-self: center;
}

/* The toolbar holds a place at the right for what the page itself
   offers -- Add Item, the star. While Select is on none of that is
   there, so the place is given up and the bar ends where Add Item would
   have, on the page's right edge. */
html.collection-selecting .fi-body .fi-resource-list-records-page .fi-ta-header-toolbar,
html.collection-selecting .fi-body .collection-items-page .fi-ta-header-toolbar {
    right: var(--collection-main-inline-gutter);
}

.collection-selection-scope.fi-link:not(.collection-selection-count):hover,
.collection-selection-scope.fi-link:not(.collection-selection-count):focus-visible {
    background: var(--collection-button-tertiary-bg);
    color: var(--collection-text);
    /* The block behind the word is the whole of what hovering says. */
    text-decoration: none;
}

/* Edit stands in the bar whether or not anything is ticked, so the bar
   does not shuffle as rows are ticked and unticked. Filament hides it
   with an inline style of its own, which is what the !important is up
   against; what it does about being unclickable is in the action. */
html.collection-selecting .fi-ta-header-toolbar .fi-ta-actions > .collection-bulk-button {
    display: flex !important;
}

/* What is left is the four of them: All, None, the switch back off, and
   what can be done with what is ticked -- Edit here, a bulk action's own
   menu on the lists that have one. Everything else the bar carries, the
   columns and the search and the filters and whatever the page itself
   offers, is about the list rather than about the selection, and waits.

   Only the icon buttons are named: a bulk action arrives as a button on
   one list and as a menu on another, and both have to stay. */
html.collection-selecting
    .fi-ta-header-toolbar
    .fi-ta-actions
    > .fi-ac-icon-btn-action:not(.collection-select-rows),
html.collection-selecting .fi-ta-header-toolbar > :not(.fi-ta-actions),
html.collection-selecting .fi-header-actions-ctn {
    display: none;
}

/* Buttons are set in title case, whatever case their label was written in. */
.fi-btn,
.fi-link,
.fi-dropdown-list-item-label {
    text-transform: capitalize;
}

/* The sign-in page: a white page, the light grey panel the edit forms use,
   white fields, and the wordmark as its heading, set like a page title. */
.fi-simple-layout {
    background: var(--collection-bg);
}

.fi-simple-main {
    border: 0;
    border-radius: 1.5rem;
    background: var(--collection-panel-bg);
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-simple-header {
    align-items: flex-start;
    text-align: start;
}

.fi-simple-header-heading {
    font-size: 48px !important;
    font-weight: 500;
    line-height: 3.25rem;
    text-align: start;
}

.fi-simple-main .fi-input-wrp,
.fi-simple-main .fi-checkbox-input:not(:checked) {
    background-color: var(--collection-bg);
}

/* The plain lists (designers, sources, fields...) are drawn like the item
   grids. Every rule, the one under the headings included, starts where the
   text does and stops the same distance short of the right edge. A row under
   the pointer is a rounded block reaching a cell's padding beyond the text
   on each side, and neither it nor the row above it shows a rule.

   A table row cannot carry that block itself, so the cells draw it between
   them: the first and last cells on show paint a rounded end, the cells
   between them a plain fill. "First on show" is the checkbox while Select is
   on, otherwise the cell after it, or simply the first where a list has no
   checkboxes. */
@media (min-width: 64rem) {
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead,
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr,
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:hover {
        border: 0;
        background: transparent;
    }

    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead > tr > *,
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr > * {
        box-shadow: inset 0 -1px 0 var(--collection-border);
    }

    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr > * {
        position: relative;
        z-index: 0;
        background-color: transparent;
    }

    /* The rule under the first and last cells stops short of the gutter. */
    html.collection-selecting .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > .fi-ta-selection-cell,
    html:not(.collection-selecting) .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > .fi-ta-selection-cell + *,
    html body .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > :first-child:not(.fi-ta-selection-cell),
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > :last-child {
        box-shadow: none;
        background-image: linear-gradient(var(--collection-border), var(--collection-border));
        background-repeat: no-repeat;
        background-position: right bottom;
        background-size: calc(100% - var(--collection-main-inline-gutter)) 1px;
    }

    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > :last-child {
        background-position: left bottom;
    }

    /* The filled row: no rules on it or on the row above. The row above
       carries a class the script gives it, never `:has(+ ...)`; see the
       note on the item grid's rows for why. */
    html:is(.collection-selecting, :not(.collection-selecting)) body .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > *:is(*, .fi-ta-selection-cell + *, :not(.fi-ta-selection-cell)),
    html:is(.collection-selecting, :not(.collection-selecting)) body .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(.collection-row-above-hover, .collection-row-above-selected) > *:is(*, .fi-ta-selection-cell + *, :not(.fi-ta-selection-cell)) {
        box-shadow: none;
        background-image: none;
    }

    /* ...a plain fill across the middle... */
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > * {
        background-color: var(--collection-token-bg);
    }

    /* ...and a rounded end at each side. */
    html.collection-selecting .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > .fi-ta-selection-cell,
    html:not(.collection-selecting) .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > .fi-ta-selection-cell + *,
    html body .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > :first-child:not(.fi-ta-selection-cell),
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > :last-child {
        background-color: transparent;
    }

    html.collection-selecting .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > .fi-ta-selection-cell::after,
    html:not(.collection-selecting) .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > .fi-ta-selection-cell + *::after,
    html body .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > :first-child:not(.fi-ta-selection-cell)::after,
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > :last-child::after {
        position: absolute;
        z-index: -1;
        inset-block: 0;
        inset-inline: calc(var(--collection-main-inline-gutter) - var(--collection-cell-pad-inline)) 0;
        border-start-start-radius: var(--collection-control-radius);
        border-end-start-radius: var(--collection-control-radius);
        background: var(--collection-token-bg);
        content: "";
        pointer-events: none;
    }

    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr:is(:hover, .fi-selected) > :last-child::after {
        inset-inline: 0 calc(var(--collection-main-inline-gutter) - var(--collection-cell-pad-inline));
        border-radius: 0;
        border-start-end-radius: var(--collection-control-radius);
        border-end-end-radius: var(--collection-control-radius);
    }

    html:not(.collection-selecting) .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > .fi-ta-selection-cell + * {
        padding-inline-start: calc(var(--collection-main-inline-gutter) - var(--collection-cell-pad-inline));
    }

    /* An older rule drew a short stub of rule in the gutter beside each
       row's first cell. The rules are inset now, so it is only a stray line. */
    html body .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > * > tr > :first-child::before {
        content: none;
    }

    /* A heading has no inner padding of its own the way a cell's text does. */
    html:not(.collection-selecting) .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead > tr > .fi-ta-selection-cell + * {
        padding-inline-start: var(--collection-main-inline-gutter);
    }
}

/* The Formats list is hand-built rather than a table, and is drawn the same
   way: rules from the text to the text, and a rounded block under the
   pointer that hides its own rule and the one above. */
.collection-simple-list-header,
.collection-simple-list-row {
    position: relative;
    isolation: isolate;
    border-bottom: 0;
}

.collection-simple-list-header::after,
.collection-simple-list-row::after {
    position: absolute;
    inset: auto 0 0;
    border-bottom: 1px solid var(--collection-border);
    content: "";
    pointer-events: none;
}

.collection-simple-list-row:hover::before {
    position: absolute;
    z-index: -1;
    inset-block: 0;
    inset-inline: calc(0rem - var(--collection-cell-pad-inline));
    border-radius: var(--collection-control-radius);
    background: var(--collection-token-bg);
    content: "";
    pointer-events: none;
}

.collection-simple-list-row:hover::after,
.collection-simple-list > .collection-row-above-hover::after {
    border-bottom-color: transparent;
}

/* Formats is a hand-built list, not a Filament table, so it is told to sit
   where the tables do: no rule under the title, headings straight below it. */
.collection-formats-page > .fi-page-header-main-ctn,
.collection-export-page > .fi-page-header-main-ctn {
    gap: 0;
}

.collection-formats-page > .fi-page-header-main-ctn > .fi-header,
.collection-export-page > .fi-page-header-main-ctn > .fi-header {
    border-bottom: 0;
}

.collection-formats-page .collection-simple-list-row > :first-child {
    font-weight: 500;
}

/* Column headings read the same on every list: the small, quieter label the
   item grids use, whichever kind of table is underneath. */
.fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead > tr > th,
.fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead > tr > th :where(span, button) {
    color: var(--collection-muted-dark);
    font-size: var(--collection-grid-header-font-size);
    font-weight: 500;
}

/* Moving between an item grid and a plain list should move nothing. These
   put the plain lists' headings and row text on the grid's lines: headings
   in a 44px band with the same offsets, row text on a 20px line with the
   grid's cell padding. */
@media (min-width: 64rem) {
    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead > tr > th {
        padding-top: calc(var(--collection-grid-sticky-offset) + (var(--collection-grid-header-height) - 1.25rem) / 2 + 1px) !important;
        padding-bottom: calc((var(--collection-grid-header-height) - 1.25rem) / 2 - 1px);
        line-height: 1.25rem;
        vertical-align: top;
    }

    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > thead > tr > th :where(span, button) {
        line-height: 1.25rem;
    }

    .fi-resource-list-records-page .fi-ta:not(.collection-grid-table) .fi-ta-table > tbody > tr > td .fi-ta-text {
        padding-block: var(--collection-cell-pad-top) var(--collection-cell-pad-bottom);
        line-height: 1.25rem;
    }
}

.collection-simple-list-header {
    height: calc(var(--collection-row-height) + var(--collection-grid-sticky-offset));
    padding-top: calc(var(--collection-cell-pad-top) + var(--collection-grid-sticky-offset));
}

/* "All Items" holds the collections as a sub-list. Filament only spaced the
   two apart while that section was the active one, so the whole nav below
   moved 4px on the way in and out of it. */
.fi-sidebar .fi-sidebar-item {
    display: flex;
    flex-direction: column;
    row-gap: 0;
}

/* "Remember me" is a quiet option, not a field label. */
.fi-simple-main .fi-fo-checkbox label,
.fi-simple-main .fi-fo-checkbox label :where(span) {
    font-weight: 400;
}

/* Search reads as a nav item until it is in use, so it takes a nav item's
   pointer; once focused it is a text field and takes the text cursor. */
.fi-sidebar .fi-global-search-ctn .fi-input-wrp:not(:focus-within),
.fi-sidebar .fi-global-search-ctn .fi-input:not(:focus) {
    cursor: pointer;
}

/* The Fields page has tabs between its title and its table. They start where
   the column headings start on every other list, and the table follows a
   short step below them. */
.fi-page-has-sub-navigation .fi-page-sub-navigation-tabs {
    margin-top: var(--collection-grid-sticky-offset);
}

.fi-page-has-sub-navigation > .fi-page-header-main-ctn > .fi-page-main {
    gap: 0.5rem;
}

@media (min-width: 64rem) {
    /* With tabs under the title, a bar pinned to the title band would sit on
       top of them. Here the filter bar takes its place in the flow instead,
       between the tabs and the table. */
    html body .fi-page-has-sub-navigation .fi-ta-filter-indicators {
        position: static;
        width: calc(100% + 2 * var(--collection-main-inline-gutter));
        height: auto;
        margin-inline-start: calc(0rem - var(--collection-main-inline-gutter));
    }

    html body .fi-page-has-sub-navigation .fi-ta-main:has(> .fi-ta-filter-indicators) {
        padding-top: 0;
    }

    html body .fi-page-has-sub-navigation .fi-ta-main:has(> .fi-ta-filter-indicators) .fi-ta-table > thead > tr > th {
        top: var(--collection-header-height);
    }
}

/* While a table's rows are on their way -- on a full load of the page, when
   they are fetched after it (see Table::configureUsing in
   AppServiceProvider) -- their place is simply held empty, at the height
   the list will have, so the footer does not jump. An outline of rules was
   drawn here before, and faded in; but the rows that replace it cascade in
   from nothing, so the rules appeared, vanished and came back with the
   rows, which read as the table flashing. Filament's spinner is hidden;
   the bar along the top of the window says the page is loading. */
.fi-ta-table-loading-ctn {
    display: block;
    min-height: calc(100dvh - var(--collection-header-height) - var(--collection-footer-height));
    padding: 0;
}

.fi-ta-table-loading-ctn > .fi-icon,
.fi-ta-table-loading-ctn > svg {
    display: none;
}


/* When a page arrives, or a list is re-sorted or paged, it comes in from
   the top.
   Each of the first 48 rows fades in over 225ms, starting a little after
   the one above it. The gaps are not even: the first rows are about
   28ms apart, and the gap shrinks all the way down (9ms by the middle,
   under 2ms near the end), so the list starts deliberately and then
   pours in. The delays follow 540ms x (1 - (1 - n/48)^2.5).

   Each row also carries a little way in from the right as it fades, which
   gives the pour a direction. Only opacity and transform move -- neither
   asks the page to lay out again -- and only on rows that can be on screen,
   and only while the document carries the arriving class (see
   markPageArriving() in collection-grid.js), so a search or a saved edit
   does not replay it. */
@media (prefers-reduced-motion: no-preference) {
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(-n+48) {
        animation: collection-row-in 225ms ease-out backwards;
    }

    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(2) { animation-delay: 28ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(3) { animation-delay: 55ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(4) { animation-delay: 80ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(5) { animation-delay: 106ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(6) { animation-delay: 130ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(7) { animation-delay: 153ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(8) { animation-delay: 176ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(9) { animation-delay: 198ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(10) { animation-delay: 219ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(11) { animation-delay: 239ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(12) { animation-delay: 258ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(13) { animation-delay: 277ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(14) { animation-delay: 295ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(15) { animation-delay: 312ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(16) { animation-delay: 328ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(17) { animation-delay: 344ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(18) { animation-delay: 359ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(19) { animation-delay: 373ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(20) { animation-delay: 387ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(21) { animation-delay: 400ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(22) { animation-delay: 412ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(23) { animation-delay: 423ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(24) { animation-delay: 434ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(25) { animation-delay: 445ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(26) { animation-delay: 454ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(27) { animation-delay: 463ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(28) { animation-delay: 472ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(29) { animation-delay: 479ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(30) { animation-delay: 487ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(31) { animation-delay: 493ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(32) { animation-delay: 500ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(33) { animation-delay: 505ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(34) { animation-delay: 511ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(35) { animation-delay: 515ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(36) { animation-delay: 519ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(37) { animation-delay: 523ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(38) { animation-delay: 526ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(39) { animation-delay: 529ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(40) { animation-delay: 532ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(41) { animation-delay: 534ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(42) { animation-delay: 536ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(43) { animation-delay: 537ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(44) { animation-delay: 538ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(45) { animation-delay: 539ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(46) { animation-delay: 539ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(47) { animation-delay: 540ms; }
    html.collection-arriving :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(48) { animation-delay: 540ms; }
}

/* Just before the cascade: the rows are in the page but held back until
   the browser has caught up and can show the cascade from its first frame. */
@media (prefers-reduced-motion: no-preference) {
    html.collection-rows-pending :is(.fi-ta-table > tbody > tr, .collection-simple-list-row):nth-child(-n+48) {
        opacity: 0;
    }
}

@keyframes collection-row-in {
    from {
        opacity: 0;
        transform: translateX(var(--collection-row-in-shift));
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* A re-sort or a page turn: the rows step out as soon as it is asked for (the script sets
   this class when the request goes and clears it when the answer is in),
   and the new order then cascades in as above. */
html.collection-sorting .fi-ta-table > tbody > tr {
    opacity: 0;
    transition: opacity 90ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
    html.collection-sorting .fi-ta-table > tbody > tr {
        opacity: 1;
        transition: none;
    }
}

/* The panel's bottom bar is the list's bottom bar continued: the same
   height, with its buttons on the same line as the pager's controls, so the
   rule above them runs straight across where panel and list meet. */
.collection-item-panel .fi-modal-footer {
    display: flex;
    box-sizing: border-box;
    min-height: var(--collection-footer-height);
    align-items: center;
    padding-block: 0;
}

/* The buttons share the bar's width equally: Save and Cancel, half each. */
.collection-item-panel .fi-modal-footer-actions {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
}

.collection-item-panel .fi-modal-footer-actions > .fi-btn {
    min-width: 0;
    flex: 1 1 0;
}

/* Deleting the record, at the foot of the panel's form (RecordPanel::
   withDelete): red words with a bin before them, starting where the labels
   start. */
.collection-panel-delete {
    padding-inline-start: 0.8125rem;
}

.collection-panel-delete .fi-link {
    gap: 0.375rem;
    font-weight: 400;
}

/* A button in the page's top bar says it is waiting by going grey, and the
   bar across the top of the page is already running. Filament also puts a
   spinner inside it, which makes the button wider by the spinner's width
   -- and the bar's buttons are packed against the table's own, so a wider
   Edit ran over the search icon beside it. The spinner is left out.
   (!important, because it is shown by a style written on the element.) */
.fi-header-actions-ctn .fi-btn > .fi-loading-indicator {
    display: none !important;
}

/* ---- Favourites and More in the sidebar ------------------------------ */

/* Starred views are listed under the collections, between two rules, with
   no heading. They are set like the collections above them: regular weight,
   one step quieter than the bold items. The rule above the first one is the
   one that already follows the collections. */
.fi-sidebar .fi-sidebar-group-items > .fi-sidebar-item[data-favorite-id] > .fi-sidebar-item-btn {
    user-select: none;
    -webkit-user-drag: none;
}

/* The weight and colour are the label's own, so they are set on the label. */
.fi-sidebar .fi-sidebar-group-items > .fi-sidebar-item[data-favorite-id] > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: var(--collection-muted-dark);
    font-weight: 400;
}

.fi-sidebar .fi-sidebar-group-items > .fi-sidebar-item[data-favorite-id].fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: var(--collection-selected-text);
    font-weight: 500;
}

/* Pressed: the item answers the press before it is known whether this is
   a click or the start of a drag. It keeps that look for as long as it is
   held, through the drag: the pointer still has hold of it. The page you
   are on is pressed in the same grey, and keeps its green, bold label. */
.fi-sidebar .fi-sidebar-item.collection-favorite-pressed > .fi-sidebar-item-btn,
.fi-sidebar .fi-sidebar-item.collection-favorite-dragging > .fi-sidebar-item-btn,
.fi-sidebar .fi-sidebar-item.fi-active.collection-favorite-pressed > .fi-sidebar-item-btn,
.fi-sidebar .fi-sidebar-item.fi-active.collection-favorite-dragging > .fi-sidebar-item-btn {
    background: var(--collection-token-bg-on-subtle);
}

/* Dragged: the item is also picked up. It gains a soft shadow and a touch
   of size and travels with the pointer, while the others close up and make
   room beneath it. The script moves it; the lift itself eases in so it
   reads as being raised. */
html.collection-favorites-sorting,
html.collection-favorites-sorting * {
    cursor: grabbing !important;
}

.fi-sidebar .fi-sidebar-item.collection-favorite-dragging {
    position: relative;
    z-index: 5;
}

.fi-sidebar .fi-sidebar-item.collection-favorite-dragging > .fi-sidebar-item-btn {
    box-shadow: var(--collection-shadow-lifted);
    transform: scale(1.02);
    transition:
        box-shadow 140ms ease-out,
        transform 140ms ease-out;
}

/* A favourite that has just been let go settles back into the list. */
.fi-sidebar .fi-sidebar-item.collection-favorite-settling {
    transition: transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* "More" holds the pages that manage the lists behind the collection. It is
   a nav item in everything but behaviour: the same height, inset and text
   as the items above, not bold, with a rule over it. */
.fi-sidebar-nav-groups > .fi-sidebar-group[data-group-label="More"] {
    position: relative;
    /* A separator stands in a row of its own, so what follows it keeps the
       list's step: half a row above the rule and half below. The rule is
       drawn by ::before, out of the flow, so it costs no height of its
       own and falls in the middle of that row. */
    margin-top: calc(var(--collection-row-height) / 2);
    padding-top: calc(var(--collection-row-height) / 2);
}

.fi-sidebar-nav-groups > .fi-sidebar-group[data-group-label="More"]::before {
    position: absolute;
    top: 0;
    /* As wide as an item's text: each end is that item's own edge brought in
       by its padding. The two ends are not the same measurement any more --
       the trailing one changed with the channel beside the list -- so a rule
       inset evenly fell short on that side. */
    inset-inline:
        var(--collection-main-inline-gutter)
        calc(var(--collection-nav-item-margin-end) + 0.75rem);
    border-top: 1px solid var(--collection-border);
    content: "";
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] > .fi-sidebar-group-btn {
    display: flex;
    /* A row like the items under it, and ending where they end. */
    min-height: var(--collection-row-height);
    align-items: center;
    justify-content: space-between;
    margin-inline:
        calc(var(--collection-main-inline-gutter) - 0.75rem)
        var(--collection-nav-item-margin-end);
    border-radius: var(--collection-control-radius);
    padding: 0.125rem 0.25rem 0 0.75rem;
    cursor: pointer;
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] > .fi-sidebar-group-btn:hover {
    background: var(--collection-token-bg);
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] .fi-sidebar-group-label {
    color: var(--collection-muted-dark);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5rem;
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] .fi-sidebar-group-collapse-btn {
    background: transparent;
    color: var(--collection-muted);
    /* Sized to its mark rather than to a control: at a control's height it
       held the heading two pixels over a row. */
    width: 1.5rem;
    height: 1.5rem;
    min-height: 0;
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] .fi-sidebar-group-items {
    /* The group already puts a pixel between its heading and this list. */
    margin-top: 0;
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] .fi-sidebar-group-items > .fi-sidebar-item > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: var(--collection-muted-dark);
    font-weight: 400;
}

.fi-sidebar .fi-sidebar-group[data-group-label="More"] .fi-sidebar-group-items > .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: var(--collection-selected-text);
    font-weight: 500;
}

/* ---- The star in a view's top corner --------------------------------- */

.fi-body .fi-header .fi-icon-btn.collection-favorite-toggle {
    width: var(--collection-control-height);
    height: var(--collection-control-height);
    border-radius: var(--collection-control-radius);
    background: transparent;
    color: var(--collection-button-tertiary-text);
}

.fi-body .fi-header .fi-icon-btn.collection-favorite-toggle:hover {
    background: var(--collection-button-tertiary-hover);
}

/* Filled, and red, while the view is among the favourites. */
.fi-body .fi-header .fi-icon-btn.collection-favorite-toggle-on {
    color: var(--collection-danger);
}

/* On a starred view only its own entry is lit. The section it belongs to
   (Designers, say, inside More) is also "current" as far as the nav knows,
   but two lit items would say two things at once. */
.fi-sidebar .fi-sidebar-nav:has(.fi-sidebar-item[data-favorite-id].fi-active)
    .fi-sidebar-group[data-group-label="More"]
    .fi-sidebar-group-items
    > .fi-sidebar-item.fi-active
    > .fi-sidebar-item-btn {
    background: transparent;
}

.fi-sidebar .fi-sidebar-nav:has(.fi-sidebar-item[data-favorite-id].fi-active)
    .fi-sidebar-group[data-group-label="More"]
    .fi-sidebar-group-items
    > .fi-sidebar-item.fi-active
    > .fi-sidebar-item-btn
    > .fi-sidebar-item-label {
    color: var(--collection-muted-dark);
    font-weight: 400;
}

/* The wordmark is a link (home, or back to the section when inside one).
   Pointing at it shows that, quietly: the near-black ink deepens into a
   very dark green (Green 800 in the palette). */
.fi-sidebar .fi-sidebar-header a .fi-logo {
    transition: color 120ms ease-out;
}

.fi-sidebar .fi-sidebar-header a:hover .fi-logo,
.fi-sidebar .fi-sidebar-header a:focus-visible .fi-logo {
    color: var(--collection-wordmark-hover);
}


/* The Export page: a paragraph or two saying what the archive is, then the
   list of what goes in it.

   The list is the same three-column shape the other plain lists use, with
   the middle column -- what each file holds -- on a width of its own rather
   than flexing, so the file names line up down the left and the counts down
   the right whatever the words in between. */

.collection-export-intro {
    display: flex;
    max-width: 44rem;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--collection-muted-dark);
}

.collection-export-intro code,
.collection-export-page .collection-simple-list-row code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    /* Monospace runs large beside Graphik at the same nominal size. */
    font-size: 0.9em;
}

.collection-export-page .collection-simple-list-row > :first-child {
    font-weight: 500;
}

.collection-export-page .collection-simple-list-header > :nth-child(2),
.collection-export-page .collection-simple-list-row > :nth-child(2) {
    flex: none;
    width: 10rem;
    text-align: left;
}


/* ---- The single-answer field ---------------------------------------- *

   ChoiceSelect: one value out of a short list. Built on the token field's
   measurements so a status sits on the same lines as the designers above
   it -- same height, same text offset, the same menu -- but it holds one
   answer, shown as plain text rather than as a token, since there is never
   a second one for it to need separating from. */

.collection-choice-select {
    position: relative;
}

.collection-choice-select-field {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3125rem 0.375rem;
    cursor: pointer;
}

/* The chosen value, and the text box that replaces it while the field is
   being typed in, start at the same place: where the label above starts. */
.collection-choice-select-value {
    min-width: 0;
    height: 1.75rem;
    flex: 1;
    overflow: hidden;
    padding: 0.125rem 0.375rem 0;
    color: var(--collection-text);
    line-height: 1.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-choice-select-value.collection-choice-select-placeholder {
    color: var(--collection-muted);
}

.fi-body .collection-choice-select-input {
    min-width: 0;
    height: 1.75rem;
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.125rem 0.375rem 0;
    line-height: 1.5rem;
    outline: 0;
    box-shadow: none;
}

/* One mark at the end of the field, never two: the cross when there is
   something to clear, the chevron when there is not. Both are drawn in the
   same box, so the value beside them keeps its width either way.

   The cross is a token's cross: the same box, the same drawing reaching to
   its edges, the same line and the same grey. */
.collection-choice-select-mark {
    display: inline-flex;
    width: var(--collection-token-mark);
    height: var(--collection-token-mark);
    flex: none;
    align-items: center;
    justify-content: center;
    margin-inline-end: 0.5rem;
    color: var(--collection-muted-dark);
}

.collection-choice-select-mark svg {
    width: 100%;
    height: 100%;
}

button.collection-choice-select-mark:hover,
button.collection-choice-select-mark:focus-visible {
    color: var(--collection-danger);
    outline: none;
}

/* The chevron is the quieter of the two: it says the list is there, where
   the cross offers to do something. */
.collection-choice-select-chevron {
    color: var(--collection-muted);
}

.collection-choice-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    inset-inline: -0.25rem;
    overflow: hidden;
    padding: 0.25rem;
    border-radius: var(--collection-control-radius);
    background: var(--collection-bg);
    box-shadow: var(--collection-shadow-menu);
}

.collection-choice-select-option {
    display: block;
    overflow: hidden;
    width: 100%;
    height: var(--collection-control-height);
    border-radius: var(--collection-token-radius);
    padding: 0.125rem calc(0.75rem + 1px) 0;
    color: var(--collection-text);
    line-height: calc(var(--collection-control-height) - 0.125rem);
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-choice-select-option-active {
    background: var(--collection-token-bg-on-strong);
}

/* The one that is already chosen, so the menu says where you are. */
.fi-body .collection-choice-select-option-chosen {
    font-weight: 500;
}

/* Making one is not picking one, so it sits under a rule at the foot of the
   menu rather than among the options. The rule spans the text, like the
   separators in the sidebar. */
.collection-choice-select-create {
    position: relative;
    /* The rule sits in this margin, drawn by the ::before below. An option
       clips what overflows it, to cut a long label off with an ellipsis;
       this one is short, and needs to let its rule out. */
    overflow: visible;
    margin-top: 0.25rem;
}

.collection-choice-select-create::before {
    position: absolute;
    top: calc(-0.125rem - 1px);
    inset-inline: calc(0.75rem + 1px);
    border-top: 1px solid var(--collection-border);
    content: '';
}

.collection-choice-select-empty {
    padding: 0.5rem calc(0.75rem + 1px);
    color: var(--collection-muted);
}

/* ---- The notification banner -----------------------------------------

   A notice is one line of plain language, dropped from the top edge and
   taken away again. Filament's own is a 24rem card in the top right corner
   carrying an icon, a title and body on separate lines, and a close cross
   in a circle -- a shape out of a different system.

   Here it is a banner the width of its own words. The title comes first,
   then whatever else there is to say, on the same line, behind a mark that
   says at a glance which kind of news it is: a tick for success, a cross
   for a failure, an exclamation for a warning, an i for a note. The palette
   has two hues, so the warning is red like the failure; the glyph inside
   the ring is what parts them.

   It arrives at the middle of the top edge rather than the right corner.
   The corners are where the page keeps its own furniture -- the title, the
   toolbar, the Add button -- and a notice landing there covers something;
   the middle of that band is the one part always left empty. */

.fi-no.fi-align-center {
    /* Clear of the window edge by the breath the banner's own padding gives
       its text, so it reads as having come to rest rather than been pinned
       to the edge. */
    inset-block-start: 0.75rem;
    gap: 0.5rem;
}

.fi-no-notification:not(.fi-inline) {
    width: auto;
    /* Wide enough for a sentence, never wider than the window. Beyond it the
       line wraps rather than being cut: a notice that cannot say what went
       wrong is worth less than a banner two lines tall. */
    max-width: min(48rem, calc(100vw - 2rem));
    /* Should the words wrap, the dot and the cross stay level with the first
       line rather than drifting to the middle of the block. Each is centred
       on that line by the arithmetic below, as a token's mark is. */
    align-items: flex-start;
    gap: 0.5rem;
    /* 2.125rem tall on one line: a little under a control, which is what a
       notice should be against the page's furniture. */
    padding: 0.4375rem 0.5rem 0.4375rem 0.75rem;
    border-radius: var(--collection-control-radius);
    background: var(--collection-bg);
    /* The treatment every floating surface here takes: a hairline and a soft
       shadow, which is also what separates it from the page on both ends of
       the ramp. */
    box-shadow: var(--collection-shadow-menu);
    /* Long enough for the overshoot below to be seen as a movement rather
       than a flicker. Alpine reads the duration off the element to know how
       long to wait, so it is set here, where it is true whichever of the
       transition classes is on at the moment it looks. */
    transition-duration: 0.42s;
    transition-timing-function: cubic-bezier(0.18, 1.5, 0.5, 1);
}

/* Going is not arriving: it leaves on a plain curve and quicker, so the
   bounce belongs to the one moment it is meant to be noticed. */
.fi-no-notification:not(.fi-inline).fi-transition-leave-start,
.fi-no-notification:not(.fi-inline).fi-transition-leave-end {
    transition-duration: 0.2s;
    transition-timing-function: ease-in;
}

@media (prefers-reduced-motion: reduce) {
    .fi-no-notification:not(.fi-inline),
    .fi-no-notification:not(.fi-inline).fi-transition-leave-start,
    .fi-no-notification:not(.fi-inline).fi-transition-leave-end {
        transition-duration: 0.15s;
        transition-timing-function: linear;
    }

    /* Nothing travels; it is simply there and then not. */
    .fi-no.fi-align-center.fi-vertical-align-start
        .fi-no-notification.fi-transition-enter-start {
        translate: none;
    }
}

/* The mark Filament puts at the front, taken down to the size of the line
   it sits on and given the app's own two colours rather than Filament's
   ramps. It is centred on the first line by the same arithmetic a token's
   remove mark uses, so it stays there when the words wrap. */
.fi-no-notification:not(.fi-inline) .fi-no-notification-icon.fi-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    margin-top: calc((var(--collection-token-line) - 1.125rem) / 2);
    color: var(--collection-accent);
}

.fi-no-notification:not(.fi-inline):is(.fi-status-danger, .fi-status-warning)
    .fi-no-notification-icon.fi-icon {
    color: var(--collection-danger);
}

/* A note is not news. Its ring is set in the grey the body text takes, so
   it marks the banner without claiming anything went right or wrong. */
.fi-no-notification:not(.fi-inline).fi-status-info .fi-no-notification-icon.fi-icon {
    color: var(--collection-muted);
}

/* One line: the title, then the body after it, rather than stacked. */
.fi-no-notification:not(.fi-inline) .fi-no-notification-main {
    display: flex;
    min-width: 0;
    flex: 0 1 auto;
    align-items: baseline;
    margin-top: 0;
    gap: 0.5rem;
}

.fi-no-notification:not(.fi-inline) .fi-no-notification-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.375rem;
}

.fi-no-notification:not(.fi-inline) .fi-no-notification-title,
.fi-no-notification:not(.fi-inline) .fi-no-notification-body {
    font-size: 1rem;
    line-height: var(--collection-token-line);
}

.fi-no-notification:not(.fi-inline) .fi-no-notification-title {
    color: var(--collection-text);
    font-weight: 500;
}

/* What happened is the title; this is the count or the reason after it, so
   it is set in the grey the page gives secondary text. */
.fi-no-notification:not(.fi-inline) .fi-no-notification-body {
    color: var(--collection-muted);
    font-weight: 400;
}

.fi-no-notification:not(.fi-inline) .fi-no-notification-body > p {
    display: inline;
}

/* The cross is the one the tokens use, painted at the same size through the
   same mask, in a target big enough to hit. Most notices take themselves
   away; the ones that wait to be read (an import that did not all fit) are
   closed from here. */
.fi-no-notification:not(.fi-inline) .fi-no-notification-close-btn {
    display: flex;
    width: 1.25rem;
    height: 1.25rem;
    min-height: 0;
    flex: 0 0 1.25rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    margin: 0;
    background: none;
    color: var(--collection-muted);
    opacity: 1;
    transition: color 0.12s ease;
}

.fi-no-notification:not(.fi-inline) .fi-no-notification-close-btn:hover,
.fi-no-notification:not(.fi-inline) .fi-no-notification-close-btn:focus-visible {
    background: none;
    color: var(--collection-text);
    outline: none;
}

/* Guarded as the token mark is: without mask support the injected icon is
   left to show rather than a solid square being painted over it. */
@supports ((-webkit-mask-image: none) or (mask-image: none)) {
    .fi-no-notification:not(.fi-inline) .fi-no-notification-close-btn > svg,
    .fi-no-notification:not(.fi-inline) .fi-no-notification-close-btn > .fi-icon {
        display: none;
    }

    .fi-no-notification:not(.fi-inline) .fi-no-notification-close-btn::before {
        display: block;
        width: var(--collection-token-mark);
        height: var(--collection-token-mark);
        background: currentColor;
        content: '';
        -webkit-mask: var(--collection-token-mark-image) center / 100% 100% no-repeat;
        mask: var(--collection-token-mark-image) center / 100% 100% no-repeat;
    }
}

/* A notice with buttons on it keeps them on the same line as the words. */
.fi-no-notification:not(.fi-inline) .fi-no-notification-actions {
    flex: 0 0 auto;
    margin: 0;
}

/* ---- The home page ---------------------------------------------------

   What a login lands on: a few modules of figures over the whole
   collection (App\Filament\Pages\Dashboard).

   The modules are a grid of cards that wraps on its own -- each asks for
   20rem and takes an equal share of what is left, so a wide window gets
   three across and a narrow one a column, with nothing to say about it
   at any particular width. A chart asks for the width of two. */
.collection-home {
    display: grid;
    /* Each card stands at its own height. They were stretched to end on
       one line while they all held a handful of figures; the charts are
       several hundred pixels of marks now, and matching them would leave
       a list of six gaps standing in a thousand pixels of empty card. */
    align-items: start;
    /* The same step below the header band that a grid's column headings
       take, which is what puts the top of the first card on the top of
       the search field across in the sidebar. */
    padding-top: var(--collection-grid-sticky-offset);
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.collection-home-module {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 2rem;
    border-radius: 1rem;
    background: var(--collection-panel-bg);
    gap: 1.25rem;
}

/* A chart stands closer to its heading than a list does: the heading is
   what the chart is of, and the years underneath are already a second
   line of type beneath it. */
.collection-home-chart {
    gap: 0.625rem;
}


.collection-home-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    gap: 1rem;
    line-height: 1.25rem;
}

/* The second half of a heading: what is not in what follows, and what a
   square is worth where it is worth more than one item. */
.collection-home-aside {
    color: var(--collection-muted);
    font-size: 0.875rem;
    font-weight: 400;
    text-align: right;
}

/* ---- How many there are, and where ----------------------------------

   The total is set at the page title's size, with its label beside it on
   two lines rather than under it, so the number is read first and the
   words only explain it. */
/* Centred rather than sat on one line: the label is two lines of small
   type against one line of large, and on a shared baseline it hangs below
   the number it belongs to. */
.collection-home-total {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 0.75rem;
}

.collection-home-total-number {
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 3rem;
}

.collection-home-total-label {
    font-size: 1rem;
    line-height: 1.25rem;
}

/* The collections under it: the count first and right-aligned so the
   figures stack into one column, the name after it. */
.collection-home-tallies {
    display: flex;
    margin: 0;
    flex-direction: column;
    padding: 0;
    gap: 0.5rem;
    list-style: none;
}

.collection-home-tallies a {
    display: flex;
    align-items: baseline;
    color: inherit;
    gap: 0.75rem;
    text-decoration: none;
}

.collection-home-tallies a:hover .collection-home-tally-label,
.collection-home-tallies a:focus-visible .collection-home-tally-label {
    color: var(--collection-accent-text);
}

.collection-home-tally {
    flex: none;
    /* Four figures' worth, so a collection of 11 and one of 426 end on the
       same line down the card. */
    width: 2.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.5rem;
    text-align: right;
}

/* The colour the collection is drawn in through both charts, so the
   charts have a key and this list has a reason to be read first. It
   sits on the text's baseline, which puts an 8px square within half a
   pixel of the middle of the name beside it, and closer to that name
   than to the count on its other side. */
.collection-home-tally-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex: none;
    margin-right: -0.25rem;
    background: var(--collection-home-ink, var(--collection-muted));
}

.collection-home-tally-label {
    overflow: hidden;
    min-width: 0;
    line-height: 1.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- The charts ------------------------------------------------------

   Two counts of the same 555 things: when the work was made, and when it
   arrived here. Both are marks of CSS rather than a drawing library --
   this is the page a login lands on and it carries no script of its own
   -- and in both a mark is one item, inked by the collection it belongs
   to. */

/* A mark takes the colour of the collection its item belongs to, keyed
   to the collection's id rather than to its place in the list, which
   moves as the collection grows. The main collection keeps the grey the
   rest of the page is drawn in; the four smaller ones take colours the
   page already has, so they turn over with the theme. A collection
   added later draws in the grey until it is given a line here.

      1  Main Collection
      2  Neue Grafik
      3  Emigre Magazine
      4  Top Symbols & Trademarks of the World
      5  HfG Ulm                                                      */
.collection-home-ink-1 {
    --collection-home-ink: var(--collection-muted);
}

.collection-home-ink-2 {
    --collection-home-ink: var(--collection-accent);
}

.collection-home-ink-3 {
    --collection-home-ink: var(--collection-danger);
}

.collection-home-ink-4 {
    --collection-home-ink: var(--collection-text);
}

.collection-home-ink-5 {
    --collection-home-ink: var(--collection-faint);
}

/* ---- The published years, stacked ------------------------------------

   The same count the other way about: a year is a row rather than a
   column, an item a mark along it, and the rows run down the card ten at
   a time under the decade they belong to.

   A row's marks are a twentieth of the card's width apiece -- a round
   number rather than the fullest year in the chart, so that the scale
   stays put as the collection grows and a row is read against the width
   rather than against whichever year happens to be fullest. What a wider
   card draws is longer marks rather than more of them.

   A mark is inked by the collection it belongs to, and a year's marks
   run in the collections' own order, so the greys of the main collection
   start every row and the colours follow in the same order each time.

   An empty year is an empty row. The rows are the years whether anything
   was made in them or not, and a stretch of nothing is a stretch of
   nothing however it is drawn. */
.collection-home-decade {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: 0.75rem;
}

/* One decade follows the next at the same 2px the rows keep between
   them: the chart is a hundred years running without a break in it, and
   the decades are told apart at the left rather than in the chart. */
.collection-home-decade + .collection-home-decade {
    margin-top: 2px;
}

/* The decade, named once beside its ten rows and ruled off above. The
   rule is the label's own, so it stops where the chart starts; it sits
   at the top of the cell, which is the top of the decade's first year. */
.collection-home-decade-label {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--collection-border);
    line-height: 1.25rem;
}

/* A year. 2px of mark and 2px of gap: the rows are a hundred of them, so
   what a row costs in height is what the chart costs in height. */
.collection-home-stack-year {
    display: flex;
    height: 2px;
}

.collection-home-stack-year + .collection-home-stack-year {
    margin-top: 2px;
}

/* An item: a share of the row's width with 1px taken off its right. */
.collection-home-stack-mark {
    position: relative;
    width: calc(100% / var(--collection-home-columns, 20));
}

.collection-home-stack-mark::after {
    position: absolute;
    border-radius: 1px;
    background: var(--collection-home-ink, var(--collection-muted));
    content: "";
    inset: 0 1px 0 0;
}
/* A year nothing was made in: a 1px tick at the left of the row, as tall
   as the row itself. An empty row is an empty row either way, but the
   tick says the row is there and was counted. */
.collection-home-stack-year-none::before {
    width: 1px;
    height: 100%;
    flex: 0 0 1px;
    background: var(--collection-border);
    content: "";
}

/* ---- The acquired years ----------------------------------------------

   A year at a time rather than a run of them: the year written out, and
   under it an 8px square an item, wrapped to the width of the card.

   Only the years something arrived in are drawn. The published chart
   keeps its empty years because a decade nothing was made in is part of
   the shape of a collection; a year nothing was bought in is a year
   nothing happened, and a hundred of those say nothing worth the
   height. */
.collection-home-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* The year stands in a column to the left of its squares, as the decades
   do in the other chart. Most years here are one row of squares, and a
   year written above one row of squares costs 32px to say 8px: beside
   them it costs the 20px of its own line and nothing more. */
.collection-home-grid-year {
    display: grid;
    align-items: center;
    grid-template-columns: 2.75rem 1fr;
    gap: 0.75rem;
}

.collection-home-grid-label {
    line-height: 1.25rem;
}

.collection-home-grid-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

/* An item. A fixed 8px square: the rows wrap to the card rather than
   being divided into it, so what a wider card holds is more squares in a
   row rather than wider ones. */
.collection-home-grid-mark {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex: 0 0 8px;
    background: var(--collection-home-ink, var(--collection-muted));
}

/* ---- What is still to fill in ---------------------------------------- */
.collection-home-gaps {
    display: flex;
    margin: 0;
    flex-direction: column;
    padding: 0;
    gap: 0.5rem;
    list-style: none;
}

.collection-home-gaps li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    line-height: 1.5rem;
}

.collection-home-gap-label {
    flex: none;
}

/* A dotted rule carries the eye from the label to its number, as a list
   of contents does. */
.collection-home-gap-rule {
    flex: 1;
    border-bottom: 1px dotted var(--collection-border);
    transform: translateY(-0.25rem);
}

.collection-home-gap-count {
    flex: none;
    font-variant-numeric: tabular-nums;
}

/* ---- The piece picked out --------------------------------------------

   One item, chosen afresh every time the page is drawn. */
.collection-home-piece-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    gap: 0.5rem;
    text-decoration: none;
}

.collection-home-piece-picture {
    display: block;
    width: 100%;
    max-height: 18rem;
    border-radius: var(--collection-token-radius);
    margin-bottom: 0.25rem;
    object-fit: contain;
    object-position: left top;
}

.collection-home-piece-name {
    font-weight: 500;
    line-height: 1.25rem;
}

.collection-home-piece-link:hover .collection-home-piece-name,
.collection-home-piece-link:focus-visible .collection-home-piece-name {
    color: var(--collection-accent-text);
}

.collection-home-piece-year {
    color: var(--collection-muted);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* The home page's header carries the Add Item button and nothing else:
   no count under the title, and no rule under the header, the cards
   below being edge enough. */
.collection-home-page > .fi-page-header-main-ctn {
    gap: 0;
}

.collection-home-page > .fi-page-header-main-ctn > .fi-header {
    border-bottom: 0;
}
