/**
 * Shared car card (assets/js/cz-car-card.js): the grid card and the Encar-style list row of the catalog.
 *
 * Extracted from assets/css/homepage-catalog.css (the live homepage card, which keeps its own copy until Phase H).
 * One DOM, two views: the list element (.czcard-grid, e.g. #cars-grid) carries data-view="grid|list" and the rules
 * below do the rest, so the view toggle never re-renders. The site root is 10px (html{font-size:62.5%}), so sizes
 * are px, never rem. Oswald 500/600 and Rubik 400/600 only. Mobile first: the card is the homepage card at phone
 * metrics on every width; wider screens only change the list row and the column count.
 *
 * Contract with the page:
 *   - an ancestor (or the list itself) has .cz-ui, which holds the card tokens (the --cz-* ones come from cz-site.css);
 *   - the list is <ul class="czcard-grid" data-view="grid|list">, each <li class="czcard-item"> holds one .czcard
 *     (the li carries the stretched link's box and the focus ring, because the card clips its overflow);
 *   - no ancestor of .czcard may carry container-type, transform, filter or contain (the drawer is position:fixed);
 *     the module itself uses no container queries (they would break the subgrid and clip the focus ring);
 *   - the view toggle calls CZCarCard.setView(list, view) (sizes= and the compact 4:3 photo source).
 */

/* ==========================================================================
   Tokens
   ========================================================================== */

.cz-ui {
    /* Colours, fonts, radii and gutter come from assets/css/cz-site.css (:root) */
    /* Card tokens */
    --czcard-gap: 12px; /* between cards and rows: 12 below 768, 16 above (the page may set --czc-gap instead) */
    --czcard-pad: 16px; /* grid card body */
    --czcard-photo-bg: var(--cz-photo-bg, #121214);
    --czcard-pressed: var(--cz-pressed, #26262a);
}

@media (min-width: 768px) {
    .cz-ui {
        --czcard-gap: 16px;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */

.cz-ui .czcard,
.cz-ui .czcard *,
.cz-ui .czcard *::before,
.cz-ui .czcard *::after,
.cz-ui .czcard-item {
    box-sizing: border-box;
}

.cz-ui .czcard [hidden] {
    display: none !important;
}

.cz-ui .czcard h2,
.cz-ui .czcard h3,
.cz-ui .czcard h4,
.cz-ui .czcard h5,
.cz-ui .czcard h6,
.cz-ui .czcard p,
.cz-ui .czcard ul,
.cz-ui .czcard li,
.cz-ui .czcard dl,
.cz-ui .czcard dt,
.cz-ui .czcard dd {
    margin: 0;
    padding: 0;
}

.cz-ui .czcard ul {
    list-style: none;
}

.cz-ui .czcard li::before,
.cz-ui .czcard li::marker {
    content: none;
}

.cz-ui .czcard-grid {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cz-ui .czcard-item {
    list-style: none;
}

.cz-ui .czcard-item::before,
.cz-ui .czcard-item::marker {
    content: none;
}

.cz-ui .czcard__sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   The list of cards (optional layout: 3 / 2 / 1 columns per the breakpoint table)
   ========================================================================== */

.cz-ui .czcard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: var(--czc-gap, var(--czcard-gap));
    row-gap: var(--czc-gap, var(--czcard-gap));
}

/* Each item is the box of its card: the stretched link's ::after covers it (not clipped by the card's overflow) */
.cz-ui .czcard-item {
    position: relative;
    display: flex;
    min-width: 0;
}

@media (min-width: 600px) {
    .cz-ui .czcard-grid[data-view="grid"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .cz-ui .czcard-grid[data-view="grid"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cz-ui .czcard-grid[data-view="grid"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .cz-ui .czcard-grid[data-view="grid"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Card
   ========================================================================== */

.cz-ui .czcard {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--cz-line);
    border-radius: var(--cz-r-lg);
    background: var(--cz-surface);
    color: var(--cz-text);
    font-family: var(--cz-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    box-shadow: none;
    -webkit-font-smoothing: antialiased;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

/* ---- Photo and scrubber ---- */

.cz-ui .czcard__media {
    position: relative;
    flex: none;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--czcard-photo-bg);
}

@supports not (aspect-ratio: 1 / 1) {
    /* iOS 14 */
    .cz-ui .czcard__media {
        height: 0;
        padding-top: 56.25%;
    }
}

.cz-ui .czcard__media picture {
    display: contents; /* the <img> positions itself against the media box */
}

.cz-ui .czcard__img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    -webkit-user-drag: none;
}

.cz-ui .czcard__nophoto {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cz-text-3);
    font-size: 13px;
    line-height: 18px;
}

.cz-ui .czcard__bars {
    position: absolute;
    right: 12px;
    bottom: 10px;
    left: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.cz-ui .czcard__media.is-scrub .czcard__bars {
    opacity: 1;
    transition-duration: 0.15s;
}

.cz-ui .czcard__bar {
    flex: 1 1 0;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(18, 18, 20, 0.35); /* visible on white studio floors */
}

.cz-ui .czcard__bar.is-active {
    background: var(--cz-red);
}

/* ---- Body ---- */

.cz-ui .czcard__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: var(--czcard-pad);
}

.cz-ui .czcard__main {
    margin-bottom: 16px; /* the price sits at least 16px below, pushed down by margin-top:auto */
}

.cz-ui .czcard__titles {
    min-height: 66px; /* two name lines + the trim: facts line up across a row */
}

.cz-ui .czcard__name {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--cz-text);
    font-family: var(--cz-display);
    font-size: 18px;
    font-weight: var(--cz-display-weight, 600);
    line-height: 22px;
    letter-spacing: var(--cz-display-track, 0.005em);
    text-transform: var(--cz-display-case, none);
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cz-ui .czcard__link,
.cz-ui .czcard__link:visited,
.cz-ui .czcard__link:hover {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s ease;
}

/* The whole item is the link */
.cz-ui .czcard__link::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    border-radius: var(--cz-r-lg);
}

.cz-ui .czcard__link:focus {
    outline: none;
}

.cz-ui .czcard__link:focus::after {
    outline: 2px solid var(--cz-red);
    outline-offset: 2px;
}

.cz-ui .czcard__link:focus:not(:focus-visible)::after {
    outline: none;
}

.cz-ui .czcard__trim {
    overflow: hidden;
    margin-top: 2px;
    color: var(--cz-text-2);
    font-size: 14px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cz-ui .czcard__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
    min-height: 44px; /* two rows, so a card with fewer facts keeps the row's rhythm */
    margin-top: 12px;
    color: var(--cz-text);
    font-size: 14px;
    line-height: 20px;
}

.cz-ui .czcard__fact {
    min-width: 0;
}

/* Tabular figures for the numbers only: Rubik's tabular set also widens the brackets («Гибрид (бензин)» +8 px) */
.cz-ui .czcard__fact[data-fact="year"],
.cz-ui .czcard__fact[data-fact="mileage"] {
    font-variant-numeric: tabular-nums;
}

.cz-ui .czcard__fact dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* «г.» after the registration year is for list rows only */
.cz-ui .czcard__unit {
    display: none;
}

.cz-ui .czcard__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
    margin-top: 14px;
}

.cz-ui .czcard__chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 2px 9px; /* 3 × 10 with the border */
    border: 1px solid transparent; /* shows in forced colours */
    border-radius: 999px;
    background: var(--cz-chip-fill, rgba(255, 255, 255, 0.07));
    color: var(--cz-text);
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    white-space: nowrap;
}

.cz-ui .czcard__chip--ok {
    background: var(--cz-ok-bg);
    color: var(--cz-ok);
}

.cz-ui .czcard__chip--caution {
    background: var(--cz-caution-bg);
    color: var(--cz-caution);
}

.cz-ui .czcard__chip--muted {
    color: var(--cz-text-2);
}

/* ---- Price ---- */

/* label 18 + number 32 + sub-line 18 = 68, plus 14 padding and the 1px rule: pending, ok and note states are equally tall */
.cz-ui .czcard__price {
    min-height: 83px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cz-line);
}

.cz-ui .czcard__price-label {
    color: var(--cz-text-2);
    font-size: 13px;
    line-height: 18px;
}

.cz-ui .czcard__price-num {
    color: var(--cz-text);
    font-family: var(--cz-display);
    font-size: 26px;
    font-weight: var(--cz-display-weight, 600);
    line-height: 32px;
    letter-spacing: var(--cz-display-track, 0.005em);
    font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
}

.cz-ui .czcard__price-num.is-new {
    animation: czcard-reveal 0.2s ease-out both;
}

@keyframes czcard-reveal {
    from {
        opacity: 0;
    }
}

.cz-ui .czcard__price-sub {
    color: var(--cz-text-2);
    font-size: 13px;
    line-height: 18px;
}

/* A note is one line with an ellipsis, so the price box never grows (the sub-line of the list row may wrap) */
.cz-ui .czcard__price-note {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cz-ui .czcard__price-sub-label {
    color: var(--cz-text-3);
}

.cz-ui .czcard__price-sub-value {
    color: var(--cz-text-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- Hover, press (no lift, no zoom: nothing can clip) ---- */

@media (hover: hover) and (pointer: fine) {
    .cz-ui .czcard-item:hover .czcard {
        border-color: var(--cz-line-strong);
    }

    .cz-ui .czcard-item:hover .czcard__link {
        text-decoration-color: var(--cz-red);
    }

    .cz-ui .czcard-item:active .czcard {
        transform: scale(0.985);
    }
}

@media (hover: none), (pointer: coarse) {
    .cz-ui .czcard-item:active .czcard {
        background: var(--czcard-pressed);
    }
}

/* Very narrow cards (below about 260px, a one-column phone under 292px): the facts become one wrapping line.
   No container query on purpose: container-type (layout containment) turns the subgrid into a plain grid and makes
   the card the containing block of the stretched link, whose focus ring the card's overflow would clip. */
@media (max-width: 291px) {
    .cz-ui .czcard__facts {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 12px;
        min-height: 0;
    }
}

/* ==========================================================================
   Skeleton (same boxes as the card, in both views)
   ========================================================================== */

.cz-ui .czcard-skel {
    display: block;
    border-radius: 6px;
    background: var(--cz-raised);
    background-clip: content-box; /* a bar inside its line box: the skeleton is as tall as the real text */
    animation: czcard-pulse 1.6s ease-in-out infinite;
}

@keyframes czcard-pulse {
    50% {
        opacity: 0.55;
    }
}

.cz-ui .czcard--skel .czcard__media {
    border-radius: 0;
    background-clip: border-box;
}

.cz-ui .czcard-skel--name {
    width: 72%;
    height: 22px;
    padding: 2px 0;
}

.cz-ui .czcard-skel--trim {
    width: 48%;
    height: 20px;
    margin-top: 2px;
    padding: 4px 0;
}

.cz-ui .czcard-skel--fact {
    width: 76%;
    height: 20px;
    padding: 4px 0;
}

.cz-ui .czcard-skel--chip {
    width: 96px;
    height: 24px;
}

.cz-ui .czcard-skel--label {
    width: 150px;
    max-width: 100%;
    height: 18px;
    padding: 4px 0;
}

/* The live number placeholder: 160 × 24 centred in the 32px line */
.cz-ui .czcard-skel--num {
    display: inline-block;
    width: 160px;
    max-width: 100%;
    height: 24px;
    vertical-align: middle;
}

.cz-ui .czcard__price > .czcard-skel--num {
    display: block;
    height: 32px;
    padding: 4px 0;
}

.cz-ui .czcard-skel--sub {
    width: 180px;
    max-width: 100%;
    height: 18px;
    padding: 4px 0;
}

/* «Проходной через 10 мес.» (176 px) and «Отчёт об осмотре» (131 px) need 313 px on one line (347 with the body
   padding): on narrower cards they wrap, so the grid skeleton holds the second chip row and the real cards come in at
   its height. Card widths from the column table (4.4): 281 / 341 / 279 / 278 / 328 px. */
@media (max-width: 378px), (min-width: 600px) and (max-width: 739px), (min-width: 900px) and (max-width: 1035px), (min-width: 1200px) {
    .cz-ui .czcard-grid[data-view="grid"] .czcard--skel .czcard__chips {
        min-height: 54px;
    }
}

/* ==========================================================================
   Rows shared by every card of a grid row (subgrid)
   ========================================================================== */

/* Each item spans five rows (photo, titles, facts, chips, price) and adopts them with subgrid, so the facts and the
   price divider line up across a row of cards without reserving a second name line in every card: the titles row is
   as tall as the tallest title of that row. The chips row takes any spare height. Row gap 0: the item's margin-bottom
   carries the gap. Without subgrid (Safari < 16, Chrome < 117) the flex column with the min-heights above does the
   same job, with the second name line always reserved. */
@supports (grid-template-rows: subgrid) {
    .cz-ui .czcard-grid[data-view="grid"] {
        grid-auto-rows: auto auto auto 1fr auto;
        row-gap: 0;
    }

    .cz-ui .czcard-grid[data-view="grid"] > .czcard-item,
    .cz-ui .czcard-grid[data-view="grid"] .czcard {
        display: grid;
        grid-row: span 5;
        grid-template-rows: subgrid;
        grid-template-columns: minmax(0, 1fr);
    }

    .cz-ui .czcard-grid[data-view="grid"] > .czcard-item {
        margin-bottom: var(--czc-gap, var(--czcard-gap));
    }

    /* The last row's margin is not a gap: the grid gives it back, so what follows (the catalog's pagination) keeps its
       own distance. Without :has() (Firefox < 121) that distance is one gap larger. */
    .cz-ui .czcard-grid[data-view="grid"]:has(> .czcard-item) {
        margin-bottom: calc(-1 * var(--czc-gap, var(--czcard-gap)));
    }

    .cz-ui .czcard-grid[data-view="grid"] .czcard {
        grid-row: 1 / -1;
    }

    .cz-ui .czcard-grid[data-view="grid"] .czcard__body,
    .cz-ui .czcard-grid[data-view="grid"] .czcard__main {
        display: contents;
    }

    .cz-ui .czcard-grid[data-view="grid"] .czcard__titles,
    .cz-ui .czcard-grid[data-view="grid"] .czcard__facts,
    .cz-ui .czcard-grid[data-view="grid"] .czcard__chips,
    .cz-ui .czcard-grid[data-view="grid"] .czcard__price {
        margin-right: var(--czcard-pad);
        margin-left: var(--czcard-pad);
    }

    .cz-ui .czcard-grid[data-view="grid"] .czcard__titles {
        min-height: 0;
        padding-top: var(--czcard-pad);
    }

    .cz-ui .czcard-grid[data-view="grid"] .czcard__chips {
        align-self: start;
    }

    .cz-ui .czcard-grid[data-view="grid"] .czcard__price {
        margin-top: 16px;
        padding-bottom: var(--czcard-pad);
    }

    /* no price box (a cell switched off): the chips close the card */
    .cz-ui .czcard-grid[data-view="grid"] .czcard__main:last-child .czcard__chips {
        margin-bottom: var(--czcard-pad);
    }
}

/* ==========================================================================
   List row: [data-view="list"], same DOM
   ========================================================================== */

/* Columns: photo | text | price. The body dissolves, so the media, the text block and the price are the card's grid items. */
.cz-ui [data-view="list"] .czcard {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 196px;
    grid-template-rows: auto;
    column-gap: 16px;
    align-items: center;
    padding: 16px;
}

.cz-ui [data-view="list"] .czcard__body {
    display: contents;
}

.cz-ui [data-view="list"] .czcard__main {
    grid-column: 2;
    align-self: start; /* the text column is top aligned, the photo and the price are centred */
    min-width: 0;
    margin: 0;
}

.cz-ui [data-view="list"] .czcard__media {
    width: 200px;
    border-radius: var(--cz-r-md);
}

@supports not (aspect-ratio: 1 / 1) {
    .cz-ui [data-view="list"] .czcard__media {
        height: 0;
        padding-top: 112.5px; /* 200 × 9 / 16 */
    }
}

.cz-ui [data-view="list"] .czcard__bars {
    right: 8px;
    bottom: 8px;
    left: 8px;
}

.cz-ui [data-view="list"] .czcard__media {
    grid-column: 1;
}

.cz-ui [data-view="list"] .czcard__price {
    grid-column: 3;
}

.cz-ui [data-view="list"] .czcard__titles {
    min-height: 0;
}

.cz-ui [data-view="list"] .czcard__name {
    font-size: 20px;
    line-height: 24px;
}

.cz-ui [data-view="list"] .czcard__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    min-height: 0;
    margin-top: 8px;
}

.cz-ui [data-view="list"] .czcard__fact {
    white-space: nowrap;
}

.cz-ui [data-view="list"] .czcard__unit {
    display: inline;
}

.cz-ui [data-view="list"] .czcard__chips {
    min-height: 0;
    margin-top: 10px;
}

/* Price column: a left divider, right aligned, vertically centred over the whole row */
.cz-ui [data-view="list"] .czcard__price {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 68px;
    margin: 0;
    padding: 0 0 0 16px;
    border-top: 0;
    border-left: 1px solid var(--cz-line);
    text-align: right;
}

.cz-ui [data-view="list"] .czcard__price-note {
    overflow: visible;
    text-overflow: clip;
    white-space: normal; /* the sub-line may wrap to two lines */
}

/* Skeleton rows are as tall as the real ones: facts are short fixed bars on one 20px line, the price bars hug the right edge */
.cz-ui [data-view="list"] .czcard-skel--name {
    height: 24px;
}

.cz-ui [data-view="list"] .czcard-skel--fact {
    flex: none;
    width: 88px;
}

.cz-ui [data-view="list"] .czcard__price > .czcard-skel {
    margin-left: auto;
}

/* No chips: no phantom margin either */
.cz-ui [data-view="list"] .czcard__chips:empty {
    display: none;
}

@media (min-width: 1200px) {
    .cz-ui [data-view="list"] .czcard {
        grid-template-columns: 224px minmax(0, 1fr) 220px;
        column-gap: 20px;
    }

    .cz-ui [data-view="list"] .czcard__media {
        width: 224px;
    }

    .cz-ui [data-view="list"] .czcard__price {
        padding-left: 20px;
    }
}

@supports not (aspect-ratio: 1 / 1) {
    @media (min-width: 1200px) {
        .cz-ui [data-view="list"] .czcard__media {
            padding-top: 126px;
        }
    }
}

/* ---- Compact list row, below 768: photo + text on top, the price as a strip below ---- */

@media (max-width: 767px) {
    .cz-ui [data-view="list"] .czcard {
        grid-template-columns: 120px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 12px;
        align-items: start;
        padding: 12px;
    }

    .cz-ui [data-view="list"] .czcard__media {
        align-self: start;
        width: 120px;
        aspect-ratio: 4 / 3;
        border-radius: var(--cz-r-sm);
    }

    @supports not (aspect-ratio: 1 / 1) {
        .cz-ui [data-view="list"] .czcard__media {
            padding-top: 90px;
        }
    }

    .cz-ui [data-view="list"] .czcard__name {
        font-size: 16px;
        line-height: 20px;
    }

    .cz-ui [data-view="list"] .czcard__trim {
        display: none;
    }

    .cz-ui [data-view="list"] .czcard__facts {
        gap: 0 12px;
        margin-top: 4px;
        color: var(--cz-text-2);
        font-size: 13px;
        line-height: 18px;
    }

    .cz-ui [data-view="list"] .czcard__fact[data-fact="gearbox"],
    .cz-ui [data-view="list"] .czcard__chip--muted {
        display: none; /* compact: year, mileage, fuel and the age chip only */
    }

    /* The age chip carries the gap, not the list: with only the (hidden) inspection chip the row collapses to nothing */
    .cz-ui [data-view="list"] .czcard__chips {
        margin-top: 0;
    }

    .cz-ui [data-view="list"] .czcard__chip--ok,
    .cz-ui [data-view="list"] .czcard__chip--caution,
    .cz-ui [data-view="list"] .czcard__chip--neutral {
        margin-top: 6px;
    }

    .cz-ui [data-view="list"] .czcard-skel--name {
        height: 20px;
    }

    .cz-ui [data-view="list"] .czcard-skel--trim,
    .cz-ui [data-view="list"] .czcard-skel--fact:nth-child(n + 4) {
        display: none; /* the compact row has no trim line and shows three facts */
    }

    .cz-ui [data-view="list"] .czcard-skel--fact {
        height: 18px;
        padding: 3px 0;
    }

    .cz-ui [data-view="list"] .czcard__chips > .czcard-skel--chip {
        margin-top: 6px;
    }

    .cz-ui [data-view="list"] .czcard__price > .czcard-skel--label {
        grid-area: label;
        margin-left: 0;
    }

    .cz-ui [data-view="list"] .czcard__price > .czcard-skel--sub {
        grid-area: sub;
        margin-left: 0;
    }

    .cz-ui [data-view="list"] .czcard__price > .czcard-skel--num {
        grid-area: num;
        justify-self: end;
        width: 120px;
        height: 28px;
        padding: 3px 0;
    }

    .cz-ui [data-view="list"] .czcard__price {
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: stretch;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "label num"
            "sub num";
        align-items: center;
        column-gap: 12px;
        min-height: 0;
        margin-top: 10px;
        padding: 10px 0 0;
        border-top: 1px solid var(--cz-line);
        border-left: 0;
        text-align: left;
    }

    .cz-ui [data-view="list"] .czcard__price-label {
        grid-area: label;
    }

    .cz-ui [data-view="list"] .czcard__price-sub {
        grid-area: sub;
    }

    .cz-ui [data-view="list"] .czcard__price-num {
        grid-area: num;
        align-self: center;
        font-size: 22px;
        line-height: 28px;
        text-align: right;
    }

    .cz-ui [data-view="list"] .czcard-skel--num {
        width: 120px;
        height: 22px;
    }
}

/* ==========================================================================
   User preferences
   ========================================================================== */

@media (forced-colors: active) {
    .cz-ui .czcard {
        border-color: CanvasText;
    }

    .cz-ui .czcard__chip {
        border-color: CanvasText;
    }

    .cz-ui .czcard__price,
    .cz-ui [data-view="list"] .czcard__price {
        border-color: CanvasText;
    }

    .cz-ui .czcard-skel {
        border: 1px solid GrayText;
        background: transparent;
    }

    .cz-ui .czcard__bars {
        display: none;
    }
}

/* All transitions to zero and a static skeleton; the photo scrub stays (it follows the user's own pointer) */
@media (prefers-reduced-motion: reduce) {
    .cz-ui .czcard,
    .cz-ui .czcard *,
    .cz-ui .czcard *::before,
    .cz-ui .czcard *::after {
        animation: none !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
