/* Same-size auction cards on the Pennyworth house front (auctions/house_front.py, house switch
   "House front page: same-size auction cards"; owner 2026-12-03: "make all current Auction Cards the
   Same Size and keep them in order of closing soonest"). Loaded only while the switch is On, so the
   page with it Off is byte for byte as before (it also carries the brand-first phone rules, house
   switch "brand first on phones", which load it too). It reuses house-front.css's type, the state pill,
   the close line, the facts line and the primary button; nothing here reaches today's cards.
   Every card is one design and one size: one across on phones, two on tablets, two or three on
   desktop (setting "auction cards per row": by default two for two or four sales, three for three
   or five and more), equal heights in a row, the buttons on one line at
   the foot of every card. Meaning never rides on colour alone: every state carries words. */
/* Brand first on phones: the band says what the house is and where pickup is, in two short lines
   (the "what" line is the owner's own wording, copy-house-front-what). */
@media (max-width:399px) {
  .pw-front[data-scene="brand-first"] .front-brand-what { display:block; }
  .pw-front[data-scene="brand-first"] .front-brand-what > span { display:none; }
}
.front-cards { min-width:0; }
.front-cards-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;
  gap:0 1rem; margin:0 0 .35rem; }
.pw-front .front-cards-head .front-h2 { margin:0; }
.front-cards-pickups { display:inline-flex; align-items:center; gap:.3rem; min-height:44px; color:var(--ink);
  font-size:var(--f-sm); font-weight:700; text-underline-offset:.18em; }
.front-cards-pickups:focus-visible,.front-cards-places a:focus-visible,.front-card-directions:focus-visible {
  outline:3px solid var(--ink); outline-offset:2px; }

/* No open sale: winners come to collect, so "My pickups" and the pickup page lead the box: the
   question on its own line on phones, then the two links as equal 44 px buttons; one line on wider
   screens. */
.front-cards-collect { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:0 0 .85rem;
  color:var(--ink); font-size:var(--f-sm); }
.front-cards-collect > svg + span { display:inline-flex; align-items:center; gap:.35rem; font-weight:700; }
.front-cards-collect .front-icon { width:1.1em; height:1.1em; margin-right:-.15rem; }
.front-cards-collect a { flex:1 1 0; display:inline-flex; align-items:center; justify-content:center; gap:.3rem;
  min-height:44px; padding:0 .9rem; box-sizing:border-box; border:1.5px solid var(--ink); border-radius:10px;
  background:var(--card); color:var(--ink); font-weight:700; text-decoration:none; white-space:nowrap; }
.front-cards-collect a:hover { text-decoration:underline; }
.front-cards-collect a:focus-visible { outline:3px solid var(--ink); outline-offset:2px; }
@media (max-width:699px) {
  .front-cards-collect > svg + span { flex:1 0 calc(100% - 1.6rem); }
}
@media (min-width:700px) {
  .front-cards-collect { gap:.75rem; }
  .front-cards-collect > svg + span { margin-right:.25rem; }
  .front-cards-collect a { flex:0 0 auto; }
}

/* The slim pickup-location row (only when a location has more than one open auction, by default). */
.front-cards-places { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:0 0 .75rem; }
.front-cards-places-label { font-size:var(--f-sm); font-weight:700; color:var(--ink); }
.front-cards-places a { display:inline-flex; align-items:center; gap:.35rem; min-height:44px; padding:0 .9rem;
  box-sizing:border-box; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--ink);
  font-size:var(--f-sm); font-weight:650; text-decoration:none; white-space:nowrap; }
.front-cards-places a:hover { text-decoration:underline; border-color:var(--ink); }
.front-cards-place-count { font-weight:500; color:var(--muted); }
/* Phones: the chips alone on one line (the row's name stays its accessible name). */
@media (max-width:699px) {
  .front-cards-places-label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .front-cards-places a { flex:1 1 auto; justify-content:center; padding:0 .6rem; }
}

/* The grid: every card the same width; a row's cards the same height. */
.front-card-grid { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:minmax(0,1fr);
  gap:16px; align-items:stretch; }
.front-card-slot { min-width:0; display:flex; }
.front-card { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; box-sizing:border-box;
  background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:var(--f-radius);
  overflow:hidden; scroll-margin-top:calc(var(--bhnav-height, 68px) + 12px); }
.front-card:focus-visible { outline:3px solid var(--ink); outline-offset:3px; }
/* The older location filter (auction-venue-filter.js) hides a card with [hidden]: the card and its
   grid cell both leave, so no empty cell is left behind. */
.front-card[hidden],.front-card-slot:has(> .front-card[hidden]) { display:none; }


/* The photo: one frame height for every card at a width; the product sits whole on white. */
.front-card-photo { flex:none; display:flex; flex-direction:column; height:clamp(168px, 52vw, 230px); margin:0;
  padding:.5rem .5rem .3rem; box-sizing:border-box; background:#fff; border-bottom:1px solid var(--line); }
.front-card-photo img { display:block; flex:1 1 auto; min-height:0; width:100%; height:100%; object-fit:contain; }
/* Its photos take turns inside the same frame (home-photo-rotation.js): a short fade, never a size change
   (the lone card's frame below keeps its size too). */
.front-card-photo[data-home-rotation] img { transition:opacity .25s ease; }
.front-card-photo.is-changing img { opacity:0; }
@media (prefers-reduced-motion:reduce) { .front-card-photo[data-home-rotation] img { transition:none; } }

.front-card-body { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:.45rem; padding:.7rem 1rem .9rem; }
.front-card-body p { margin:0; }
.front-card-body .front-state { align-self:flex-start; }
/* The name: three lines at most (the link's title and screen readers carry it whole). The clamp
   sits on the link, so nothing clips its focus ring. */
.pw-front .front-card-title { margin:0; font-family:var(--f-serif); font-weight:500; font-size:var(--f-lg); line-height:1.25; }
.front-card-title a { color:var(--ink); text-decoration:none; display:-webkit-box; -webkit-line-clamp:3;
  -webkit-box-orient:vertical; overflow:hidden; }
.front-card-title a:hover { text-decoration:underline; }
/* Where to collect, in plain words with the pin, right under the close (owner 2026-12-03: buyers
   asked whether they could pick up). The street and the days follow in the line under it. */
.front-card-where { display:flex; align-items:flex-start; gap:.45rem; padding:.45rem .65rem; border:1px solid var(--line);
  border-radius:10px; background:color-mix(in srgb, var(--ink) 5%, var(--card)); color:var(--ink);
  font-size:var(--f-md); line-height:1.35; }
.front-card-where .front-icon { width:1.15em; height:1.15em; margin-top:.1em; }
.front-card-where strong { font-weight:750; }
.front-card-varies { font-size:var(--f-sm); font-weight:500; }
.front-card-pickup { font-size:var(--f-sm); line-height:1.45; color:var(--ink); }
/* The fee and the terms link stay on one line (no lone "Sale terms" under the fee). */
/* Lots, fee and Sale terms: a "·" between items on one line, never at a line's start or end (review of
   bc3e18d1, P3-1). Each item's dot sits in the gap before it; the list is shifted left by that gap and
   its clip-path cuts exactly that strip, so the first item on every line shows no dot (focus rings keep
   their room on the other sides). Items never break inside. */
.front-card-body .front-fact-list { display:flex; flex-wrap:wrap; margin-left:-1.1em; clip-path:inset(-.5em -.5em -.5em 1.1em); }
.front-fact-list > .front-fact { position:relative; padding-left:1.1em; white-space:nowrap; }
.front-fact-list > .front-fact::before { content:"·" / ""; position:absolute; left:.4em; }
/* Directions: a 44 px target without changing the line. */
.front-card-directions { display:inline-flex; align-items:center; gap:.2rem; padding:.75rem 0; margin:-.75rem 0;
  color:var(--ink); font-weight:700; white-space:nowrap; text-underline-offset:.18em; }
.front-card-directions .front-icon { width:1em; height:1em; }

/* [View lots & bid →] [Share Auction] on one line at the foot of every card, the same place on
   each (a very large text setting lets Share drop under the bid button, full width). */
.front-card-actions { margin-top:auto; padding-top:.3rem; display:flex; flex-wrap:wrap; align-items:stretch; gap:.5rem; }
.front-card-actions .front-enter { flex:1 1 auto; padding:.6rem .85rem; white-space:nowrap; }
.pw-front .front-card-actions .share-btn { flex:1 0 auto; min-height:48px; padding:.5rem .8rem; border-radius:10px;
  border:1.5px solid var(--ink); background:transparent; color:var(--ink); font-size:var(--f-sm); font-weight:700; }
.pw-front .front-card-actions .share-btn:hover { background:transparent; text-decoration:underline; }

@media (min-width:700px) {
  .front-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .front-card-photo { height:230px; }
  /* One open auction: the card across the page, the photo beside the words. */
  .front-cards[data-cards="1"] .front-card-grid { grid-template-columns:minmax(0,1fr); }
  .front-cards[data-cards="1"] .front-card { display:grid; grid-template-columns:minmax(0,44%) minmax(0,1fr);
    grid-template-rows:auto 1fr; }
  .front-cards[data-cards="1"] .front-card-photo { grid-column:1; height:auto; min-height:280px; border-bottom:0;
    border-right:1px solid var(--line); }
  /* Its size never follows the photo showing (its photos take turns). Its width is its own column's
     (width:100%, min-width:0); the square ratio then gives it a height at least that width, and it
     stretches to the words when they are taller. Without the width the ratio would size the width
     from the stretched height and push the frame over the words (review of de69623e, P1-1).
     overflow:hidden keeps the picture's own size out of it; the product stays whole and centred
     (object-fit:contain). */
  .front-cards[data-cards="1"] .front-card-photo { width:100%; min-width:0; aspect-ratio:1 / 1; align-self:stretch;
    overflow:hidden; }
  .front-cards[data-cards="1"] .front-card-body { grid-column:2; padding:1rem 1.25rem; gap:.6rem; }
  .pw-front .front-cards[data-cards="1"] .front-card-title { font-size:calc(var(--f-lg) * 1.3); }
  .front-cards[data-cards="1"] .front-card-where { align-self:flex-start; padding-right:1rem; }
  .front-cards[data-cards="1"] .front-card-actions .front-enter,
  .front-cards[data-cards="1"] .front-card-actions .share-btn { flex:0 0 auto; }
}
@media (min-width:1024px) {
  .front-cards[data-per-row="three"]:not([data-cards="1"]) .front-card-grid,
  .front-cards[data-per-row="auto"][data-cards="3"] .front-card-grid,
  .front-cards[data-per-row="auto"][data-cards="many"] .front-card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .front-cards:not([data-cards="1"]) .front-card-photo { height:250px; }
  .front-cards[data-per-row="three"]:not([data-cards="1"]) .front-card-photo,
  .front-cards[data-per-row="auto"][data-cards="3"] .front-card-photo,
  .front-cards[data-per-row="auto"][data-cards="many"] .front-card-photo { height:210px; }
}
@media (forced-colors:active) {
  .front-card,.front-cards-places a { border:1px solid CanvasText; }
}
@media print { .front-card-actions .share-btn { display:none; } }
/* "Coming up" rows with the cards On: the pin and the card's own pickup words in place of the flag. */
.front-row-where { display:flex; align-items:center; gap:.3rem; font-size:var(--f-sm); font-weight:750; color:var(--ink); }
.front-row-where .front-icon { width:1em; height:1em; }
