/* Rent fleet and accessories (pages/inchirieri, pages/accesorii). The list pages reuse the category hero, the breadcrumb and
   the listing card of categorie.css; the detail pages add the request slip: the staff's rates on a navy field, joined to
   the reservation form (SiteReservationForm, lead-form.css). Tokens only. Written for the 375 px phone first. */
::selection { background: var(--navy); color: var(--on-navy); }
/* The sticky header must not cover the form a "Cere rezervare" link jumps to. */
html { scroll-padding-top: calc(var(--top-h) + var(--s-4)); }

/* Rates: one row per tier, the label left and the amount right, exactly as staff entered them. */
.rates { display: grid; width: 100%; margin: 0; }
.rates div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding-block: var(--s-2); border-top: 1px solid var(--line); }
.rates div:first-child { border-top: 0; }
.rates dt { min-width: 0; font-size: var(--step--1); color: var(--ink-2); overflow-wrap: anywhere; }
.rates dd { margin: 0; font-size: var(--step--1); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rates dd b { font-size: var(--step-1); font-weight: 700; font-stretch: var(--display-stretch); letter-spacing: -0.02em; color: var(--ink); }

/* Fleet list: the listing card, with the rates as the body of the row. */
.rent-row .car-body { justify-items: stretch; gap: var(--s-4); padding: 0 var(--s-2) var(--s-2); }
.rent-title { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; overflow-wrap: anywhere; }
.rent-title a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.rent-brief { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; max-width: 56ch; font-size: var(--step-0); color: var(--ink-2); text-wrap: pretty; }
.rent-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.rent-acts .btn { min-height: 48px; }
.rent-acts .link { font-size: var(--step--1); padding-block: var(--s-3); }.list-bar .count span { margin-left: 0.2em; }

/* Empty and failed lists: what happened, and the two ways to reach the desk. */
.cat-empty { margin-top: var(--s-2); }
.cat-empty h2 { font-size: var(--step-2); }
.cat-empty-art { width: 120px; height: auto; color: var(--ink-3); }
.cat-empty-acts { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Accessories: one object per grey tile; two columns on a phone, up to four on a desktop. */
.goods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-3); }
.good { display: grid; gap: var(--s-1); align-content: start; height: 100%; border-radius: 12px; }
.good-media { display: block; aspect-ratio: 1; margin-bottom: var(--s-2); border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.good-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms var(--ease-out); }
.good:hover .good-media img { transform: scale(1.03); }
.good-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.good:hover .good-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.good-sku { font-size: var(--step--1); color: var(--ink-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.good-price { margin-top: var(--s-1); font-size: var(--step-1); font-weight: 700; font-stretch: var(--display-stretch); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Detail page: title and photos, then the slip, then the text. One column on a phone. */
.det { display: grid; gap: var(--s-6); padding-bottom: var(--s-8); }
.det-head, .det-body { display: grid; gap: var(--s-4); min-width: 0; }
.det-head h1 { max-width: 22ch; font-size: var(--step-3); overflow-wrap: anywhere; }
/* One column: the way to the form and the first rate sit under the title, before the photos push the slip down. */
.det-jump { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.det-jump .btn { min-height: 48px; }
.det-first { display: grid; min-width: 0; overflow-wrap: anywhere;font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.det-first b { font-size: var(--step-1); font-weight: 700; font-stretch: var(--display-stretch); letter-spacing: -0.02em; color: var(--ink); }
.det-sku { font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.det-sku b { color: var(--ink); font-weight: 600; }
.det-body h2 { margin-top: var(--s-5); font-size: var(--step-2); }
.det-body > h2:first-child { margin-top: 0; }
.det-text { max-width: 68ch; color: var(--ink-2); white-space: pre-line; text-wrap: pretty; overflow-wrap: anywhere; }
/* Staff enter any number of specifications: the cells draw their own rules, so a short last row leaves card, not a grey block. */
.det-body .specs { margin-block: 0; gap: 0; background: var(--card); }
.det-body .specs div { background: none; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.det-body .specs b { overflow-wrap: anywhere; }

/* Photos: the large one, and a strip of thumbnails that swap it. */
.shots { display: grid; gap: var(--s-3); min-width: 0; }
.shots-lead { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-2); }
.shots-lead img { width: 100%; height: 100%; object-fit: cover; animation: shot-in 320ms var(--ease-out); }
@keyframes shot-in { from { opacity: 0.4; } }
/* The large photo is the button that opens the full-screen viewer; the counter on it says how many there are. */
.shots-open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; touch-action: pan-y; }
/* Focus returns to the photo when the viewer closes: the ring sits outside the photo, in navy, never as a line inside it. */
.shots-open:focus-visible { outline: 0; }
.shots-lead:has(.shots-open:focus-visible) { outline: 2px solid var(--navy-ink); outline-offset: 3px; }
.shots-count { position: absolute; right: var(--s-3); bottom: var(--s-3); display: inline-flex; align-items: center; gap: 0.45em; padding: 0.4rem 0.75rem; border-radius: var(--radius-pill); background: oklch(0.1 0.005 268 / 0.72); color: #fff; font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: background var(--t-fast); }
.shots-count .icon { width: 14px; height: 14px; }
.shots-open:hover .shots-count { background: var(--black); }
.shots-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 5.5rem; gap: var(--s-2); padding: 3px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.shots-strip button { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--paper-2); opacity: 0.85; transition: opacity var(--t-fast); }
.shots-strip button:hover, .shots-strip button[aria-current] { opacity: 1; }
.shots-strip button[aria-current] { outline: 2px solid var(--navy); outline-offset: 1px; }
.shots-strip button:focus-visible { opacity: 1; outline: 2px solid var(--navy-ink); outline-offset: 3px; }
.shots-strip button:active { transform: scale(0.97); }
.shots-strip img { width: 100%; height: 100%; object-fit: cover; }

/* Points of interest (SiteGalleryPoi), over the large photo and over the viewer's photo. The layer lets every touch through to
   the photo until a card is open; then a tap on the photo only closes the card. A dot is a 44 px target around a black
   showroom disc ringed by a white hairline, carrying the point's Hairline drawing; after the photo has loaded the dots rise
   in one by one. An open dot turns white, a hairline tether draws out of it, and the black card unfolds from the tether's end
   while its drawing, title, text and specification follow. */
.poi { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.poi[data-open] { pointer-events: auto; }
/* The drawings (data/poiIconPaths.ts): solids filled with the ground they sit on, a dim crease, one bright mark. */
.poi-glyph { display: block; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.poi-dot { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; animation: poi-in 560ms var(--ease-lift) calc(240ms + var(--k) * 90ms) backwards; transition: opacity var(--t-fast); }
.poi-disc { --glyph-ground: var(--black-2); --glyph-dim: 0.5; position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--black-2); color: #fff; box-shadow: inset 0 0 0 1.5px oklch(1 0 0 / 0.7), 0 4px 12px -2px oklch(0 0 0 / 0.5); transition: transform 320ms var(--ease-lift), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.poi-disc .poi-glyph { width: 24px; height: 24px; }
/* A slow hairline ring leaves each closed dot now and then, so a visitor sees that the photo has more to say. */
.poi-disc::after { content: ""; position: absolute; inset: 0; border: 1.5px solid oklch(1 0 0 / 0.9); border-radius: 50%; opacity: 0; pointer-events: none; animation: poi-ring 3.6s var(--ease-out) calc(1100ms + var(--k) * 280ms) infinite; }
.poi-dot:hover .poi-disc { transform: scale(1.1); }
.poi-dot:active .poi-disc { transform: scale(0.94); }
.poi-dot:focus-visible { outline: 0; }
.poi-dot:focus-visible .poi-disc { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--navy-deep); }
.poi-dot[aria-expanded="true"] .poi-disc { --glyph-ground: #fff; --glyph-dim: 0.45; background: #fff; color: var(--black-2); box-shadow: 0 0 0 1.5px var(--black-2), 0 4px 12px -2px oklch(0 0 0 / 0.5); transform: scale(1.1); }
.poi-dot[aria-expanded="true"] .poi-disc::after { animation: none; }
/* The other dots step back by size, not by fading: a faded black disc goes muddy on a dark cabin photo. */
.poi[data-open] .poi-dot[aria-expanded="false"] .poi-disc { transform: scale(0.82); }
.poi[data-open] .poi-dot[aria-expanded="false"]:hover .poi-disc { transform: scale(0.94); }
@keyframes poi-in { from { opacity: 0; transform: translateY(6px) scale(0.5); } }
@keyframes poi-ring { 0% { opacity: 0.9; transform: scale(1); } 45%, 100% { opacity: 0; transform: scale(1.8); } }
/* The tether: a white hairline from the open dot to its card, drawn out of the dot before the card opens. */
.poi-tether { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; filter: drop-shadow(0 1px 1.5px oklch(0 0 0 / 0.55)); }
.poi-tether line { stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; animation: poi-draw 240ms var(--ease-out) backwards; }
.poi-tether circle { fill: #fff; transform-box: fill-box; transform-origin: center; animation: poi-pop 200ms var(--ease-out) 200ms backwards; }
@keyframes poi-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes poi-pop { from { transform: scale(0); } }

/* The card is one of the site's black showroom objects (`dark` flips the tokens): a hairline frame, the point's drawing large
   beside the expanded title, the benefit, and the specification on its own plate under a rule. Beside its dot on a wide photo;
   under the photo on a narrow one, with a notch over the dot it belongs to. */
.poi-card { --glyph-ground: var(--paper); --glyph-dim: 0.45; --glyph-mark: var(--on-navy-2); position: absolute; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: var(--s-2) var(--s-3); width: 15.5rem; max-height: calc(100% - 2 * var(--s-3)); padding: var(--s-4); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-float); text-align: left; cursor: auto; visibility: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.poi-card ::selection { background: var(--navy-hover); color: #fff; }
.poi-card[data-placed] { visibility: visible; animation: poi-card-in 440ms var(--ease-out) backwards; }
.poi-card[data-mode="side"][data-placed] { animation-delay: 140ms; }
.poi-card[data-from="left"] { --poi-clip: inset(0 100% 0 0 round var(--radius-lg)); --poi-shift: translateX(-10px); }
.poi-card[data-from="right"] { --poi-clip: inset(0 0 0 100% round var(--radius-lg)); --poi-shift: translateX(10px); }
.poi-card[data-from="bottom"] { --poi-clip: inset(100% 0 0 0 round var(--radius-lg)); --poi-shift: translateY(10px); }
.poi-card[data-from="top"] { --poi-clip: inset(0 0 100% 0 round var(--radius-lg)); --poi-shift: translateY(-10px); }
.poi-card[data-placed] > * { animation: poi-rise 380ms var(--ease-out) calc(140ms + var(--j, 0) * 50ms) backwards; }
.poi-card > :nth-child(2) { --j: 1; }
.poi-card > :nth-child(3) { --j: 2; }
.poi-card > :nth-child(4) { --j: 3; }
@keyframes poi-card-in { from { opacity: 0; clip-path: var(--poi-clip); transform: var(--poi-shift); } to { clip-path: inset(-3rem round var(--radius-lg)); } }
@keyframes poi-rise { from { opacity: 0; transform: translateY(6px); } }
.poi-card-glyph { width: 40px; height: 40px; margin: calc(-1 * var(--s-1)) 0 0 calc(-1 * var(--s-1)); stroke-width: 1.3; }
/* Drawing and title share the first row (the close button sits at its end); text and specification run the full width. */
.poi-card-title { align-self: center; min-height: 44px; display: flex; align-items: center; padding-right: var(--s-6); font-family: var(--font-display); font-size: var(--step-0); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.poi-card-body, .poi-card-spec { grid-column: 1 / -1; }
.poi-card-body { font-size: var(--step-0); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; overflow-wrap: anywhere; }
.poi-card-spec { margin-top: var(--s-1); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--step--1); font-weight: 600; line-height: 1.35; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.poi-card-x { position: absolute; top: var(--s-1); right: var(--s-1); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.poi-card-x .icon { width: 18px; height: 18px; }
.poi-card-x:hover { background: var(--paper-2); color: var(--ink); }
.poi-card-x:active { background: var(--line-strong); }
.poi-card-x:focus-visible { outline: 2px solid var(--navy-ink); outline-offset: -4px; }
/* A narrow photo never has the card over it (owner, 2026-11-22). Under the large photo the card opens in its own row, which
   grows from nothing to the card's height (grid rows 0fr to 1fr), so the photo and its dots stay where the finger is and
   only the thumbnails move down. The row shares a wrapper with the frame, outside the gallery's gap: closed, it adds no space. */
.shots-main { display: grid; min-width: 0; }
.shots-poi { display: contents; }
.poi-below { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); }
.poi-below[data-open] { grid-template-rows: 1fr; }
.poi-below-in { min-height: 0; overflow: hidden; }
.poi-card[data-mode="below"] { position: relative; z-index: auto; width: auto; max-height: none; margin-top: var(--s-3); overflow: visible; box-shadow: none; visibility: visible; animation: none; }
/* In the viewer the card hangs in the dark space under the photo, as wide as the photo; the photo moves up to make room. */
.poi-card[data-mode="under"], .poi-card[data-mode="strip"] { width: calc(100% - 2 * var(--s-3)); }
.poi-card[data-mode="under"] { max-height: none; overflow: visible; }
/* The notch: a corner of the card's frame that points up at the open dot (clamped inside the card's rounded corners). */
.poi-card[data-mode="below"]::before, .poi-card[data-mode="under"]::before { content: ""; position: absolute; top: -8px; left: clamp(var(--s-4), var(--poi-notch, 50%) - 7px, 100% - var(--s-4) - 14px); width: 14px; height: 14px; border: solid var(--line-strong); border-width: 1px 0 0 1px; border-top-left-radius: 3px; background: var(--paper); transform: rotate(45deg); }
.lb-stage img, .lb-stage .poi { transition: transform 320ms var(--ease-out); }
/* The fallback strip over a photo (a viewer too short for the card under it) drops the drawing: the dot carries it. */
.poi-card[data-mode="strip"] { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); padding: var(--s-3) var(--s-4) var(--s-4); }
.poi-card[data-mode="strip"] .poi-card-glyph { display: none; }
.poi-card[data-mode="strip"] .poi-card-title { min-height: 36px; }
/* Beside a dot on a wide photo the text steps down: the card is read at arm's length from a desk, not a phone. */
@media (min-width: 641px) {
  .poi-card-body { font-size: var(--step--1); }
}

/* The slip: rates on navy, the form under it. On a phone the form runs on the page, so the anti-spam check keeps its width. */
.slip { display: grid; min-width: 0; }
.slip-rates { display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--radius-lg); background: var(--navy); color: var(--on-navy); --ink: var(--on-navy); --ink-2: var(--on-navy-2); --line: oklch(1 0 0 / 0.18); }
.slip-rates h2 { font-size: var(--step-1); }
.slip-rates > p { font-size: var(--step--1); color: var(--on-navy-2); text-wrap: pretty; }
.slip-rates .rates dd b { font-size: var(--step-2); }
.slip-rates .slip-price { font-size: var(--step-0); font-variant-numeric: tabular-nums; }
.slip-price b { font-size: var(--step-3); font-weight: 700; font-stretch: var(--display-stretch); letter-spacing: -0.03em; color: var(--on-navy); }
.slip-body { padding-top: var(--s-5); }
.slip .lead-form { width: 100%; margin: 0; }

@media (min-width: 641px) {
  .goods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
  .slip-rates { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .slip-body { padding: var(--s-5); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: var(--card); }
  .slip-body:first-child { border-top: 1px solid var(--line); border-radius: var(--radius-lg); }
}
@media (min-width: 901px) {
  .rent-row .car-body { padding: var(--s-2) var(--s-3) var(--s-2) 0; }
  .det { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; gap: var(--s-6) var(--s-7); align-items: start; }
  .det-head { grid-column: 1; grid-row: 1; }
  .det-body { grid-column: 1; grid-row: 2; }
  .slip { grid-column: 2; grid-row: 1 / span 2; }
  /* The slip is already beside the title: the jump link is for the one-column layout. */
  .det-jump { display: none; }
  .det-body .specs { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .goods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .shots-lead img { animation: none; }
  .good-media img, .shots-strip button { transition: none; }
  .poi-dot, .poi-disc::after, .poi-card[data-placed], .poi-card[data-placed] > *, .poi-tether line, .poi-tether circle { animation: none; }
  .poi-dot, .poi-disc, .poi-card-x, .poi-below, .lb-stage img, .lb-stage .poi { transition: none; }
  .good:hover .good-media img { transform: none; }
}

/* Locations from the admin (SiteHome, #locatii, when /api/branches has rows; this file is linked only then). The cards keep
   the classes of base.css; these rules add what staff data needs: a card without a photo, hours and a phone in the body, and
   a grid that composes for one, two, four or more cards. base.css spans the last card on a tablet and crops it wide, which is
   right for three cards only, so the :nth-child(n) selectors below out-rank it without relying on stylesheet order. */
.locs[data-n] .loc-card:nth-child(n) { position: relative; grid-column: auto; }
/* --loc-ar is the crop of the picture slot of a card; a rule changes the crop by setting it on the card. */
.locs[data-n] .loc-card:nth-child(n) img { height: auto; aspect-ratio: var(--loc-ar, 4 / 3); }
/* No photo: the address is the picture, set in the display voice on the navy field. */
.loc-plate { display: grid; align-content: end; justify-items: start; gap: var(--s-3); min-height: 9.5rem; padding: var(--s-5); aspect-ratio: var(--loc-plate-ar, var(--loc-ar, 4 / 3)); --loc-plate-ar: auto; background: var(--navy-deep); color: var(--on-navy); font-family: var(--font-display); font-size: var(--step-2); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.loc-plate .icon { width: 24px; height: 24px; color: var(--on-navy-2); }
.locs[data-n] .loc-body { align-content: start; }
.locs[data-n] .loc-body h3 { overflow-wrap: anywhere; }
/* The whole card opens the map; the phone sits above that layer and dials. */
.loc-map::after { content: ""; position: absolute; inset: 0; }
.loc-map:focus-visible { outline: 0; }
.loc-card:has(.loc-map:focus-visible) { outline: 2px solid var(--navy); outline-offset: 3px; }
.locs[data-n] .loc-body address { align-items: flex-start; overflow-wrap: anywhere; }
.loc-hours, .loc-tel { grid-column: 1 / -1; display: flex; gap: 0.5em; font-size: var(--step--1); }
.loc-hours { align-items: flex-start; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.loc-body address .icon, .loc-hours .icon { margin-top: 0.15em; } /* size: base.css; top-aligned rows sit the icon on the first line */
.loc-tel { position: relative; z-index: 1; justify-self: start; align-items: center; min-height: 44px; margin-block: calc(-1 * var(--s-2)); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.loc-tel:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.loc-tel:active { color: var(--ink-2); }
.loc-badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }

/* Brand strip of the home with admin logos: an upload can be any colour on any ground, so it is greyed and multiplied into
   the tile instead of being painted black as the five built-in marks are. */
.brands-row .from-admin img { max-height: 56px; object-fit: contain; filter: grayscale(1); mix-blend-mode: multiply; opacity: 0.9; transition: opacity var(--t-fast); }
/* Each tile opens the stock of its brand; the whole tile is the link. */
.brands-row .from-admin { padding: 0; }
.brands-row .from-admin a { display: grid; place-items: center; width: 100%; height: 100%; min-height: 96px; padding: var(--s-4); border-radius: 12px; transition: background var(--t-fast); }
.brands-row .from-admin a:hover { background: var(--line); }
.brands-row .from-admin a:hover img { opacity: 1; }
.brands-row .from-admin a:active { background: var(--line-strong); }
.brands-row[data-n] li:last-child { grid-column: auto; }
.brands-row[data-n] li:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (min-width: 641px) {
  /* Beside photographs a plate takes their crop, so the bodies line up. With no photograph in the section, and in the
     lying card, it is as tall as its address. */
  .loc-plate { --loc-plate-ar: initial; min-height: 0; }
  .locs-plain .loc-plate, .loc-row .loc-plate { --loc-plate-ar: auto; }
  .locs-plain .loc-plate { padding-top: var(--s-7); }
  /* A card alone in its row lies down: picture left, the details beside it. */
  .locs[data-n] .loc-row:nth-child(n) { grid-column: 1 / -1; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto; }
  .locs[data-n] .loc-row:nth-child(n) img { height: 100%; aspect-ratio: 16 / 9; }
  .loc-row .loc-plate { aspect-ratio: auto; min-height: 15rem; padding: var(--s-6); font-size: var(--step-3); }
  .locs[data-n] .loc-row .loc-body { align-content: center; padding: var(--s-6); }
  .loc-row .loc-body h3 { font-size: var(--step-2); }
  .brands-row[data-n] li:last-child:nth-child(odd) { grid-column: auto; }
  .brands-row[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brands-row[data-n="7"], .brands-row[data-n="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 641px) and (max-width: 900px) {
  .locs[data-n] .loc-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* The lying card on a tablet: equal halves, so the name and the address keep a usable measure. */
  .locs[data-n] .loc-row:nth-child(n) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locs[data-n] .loc-row .loc-body { padding: var(--s-5); }
  .loc-row .loc-body h3 { font-size: var(--step-1); }
  .loc-row .loc-plate { font-size: var(--step-2); }
  .locs[data-n] .loc-card:last-child:nth-child(odd):not(.loc-row) { --loc-ar: 16 / 7; }
}
@media (min-width: 901px) {
  /* Side by side, plates of one and two address lines end on the same line. */
  .locs-plain .loc-card:not(.loc-row) .loc-plate { min-height: 13.75rem; }
  .locs[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
  .locs[data-n="2"], .locs[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Four stay two by two at every desktop width: four columns leave a name three lines to fit in. */
  .locs[data-n="2"], .locs[data-n="4"] { --loc-ar: 16 / 9; }
  /* Five and more: three to a row on a six-track grid, so a last row of two is shared as halves. */
  .locs[data-n="5"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .locs[data-n="5"] .loc-card:nth-child(n) { grid-column: span 2; }
  .locs[data-n="5"] .loc-half:nth-child(n) { grid-column: span 3; }
  .locs[data-n="5"] .loc-half { --loc-ar: 16 / 9; }
  .locs[data-n="5"] .loc-row:nth-child(n) { grid-column: 1 / -1; }
}
