/* RUIND Garage (public): the cars as shared list cards; /garage/tesla/ has the Tesla's stats. Greyscale. */
.garage-head { padding: 14px 16px 15px; margin-bottom: 14px; text-align: center; }
.garage-head:has(.sign-face) { padding-top: 0; padding-left: 0; padding-right: 0; overflow: hidden; }
.garage-head .sign-face--head { width: 100%; margin: 0 0 12px; }
.garage-head:has(.sign-face) h1,
.garage-head:has(.sign-face) p { padding-left: 16px; padding-right: 16px; }
.garage-head h1 { font: 700 clamp(20px, 3vw, 26px)/1.1 var(--font-ui); }
.garage-head p { margin-top: 5px; color: var(--ink-2); font-size: 14px; }

.garage-stats { margin-top: 14px; padding: 12px 16px 14px; scroll-margin-top: 60px; }
.garage-stats h2 { font: 700 16px/1.2 var(--font-ui); }
.garage-stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.garage-stats__grid > div { padding: 8px 10px; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; }
.garage-stats dt { font-size: 12.5px; color: #525252; }
.garage-stats dd { margin: 2px 0 0; font: 24px/1 var(--font-lcd); white-space: nowrap; }
@media (max-width: 420px) { .garage-stats__grid > div { padding: 7px 8px; } .garage-stats dt { font-size: 11.5px; } .garage-stats dd { font-size: 19px; } }
.garage-stats__note { margin-top: 8px; font-size: 12.5px; color: #636363; }
.garage-stats__h { margin-top: 14px; font: 700 15px/1.2 var(--font-ui); }
.garage-stats > .garage-stats__h:first-child { margin-top: 0; }
.garage-head__car { display: block; margin: 0 auto 6px; image-rendering: pixelated; }
.garage-stats__h + .garage-stats__grid { margin-top: 6px; }

.garage-recap table { width: 100%; margin-top: 6px; border-collapse: separate; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; overflow: hidden; border-spacing: 0; }
.garage-recap th, .garage-recap td { padding: 6px 8px; text-align: right; white-space: nowrap; }
.garage-recap th:first-child { text-align: left; }
.garage-recap thead th { font: 700 12px/1.2 var(--font-ui); color: #525252; border-bottom: 1.5px solid var(--line, #313131); }
.garage-recap tbody td { font: 20px/1 var(--font-lcd); }
.garage-recap tbody th { font: 400 14px/1.2 var(--font-ui); }
.garage-recap tbody tr + tr > * { border-top: 1px solid #cecece; }
.garage-recap__foot { display: flex; justify-content: center; margin-top: 8px; }
.garage-recap__more { min-height: 32px; padding: 4px 16px; font: 600 15px/1 var(--font-ui); color: var(--ink); background: #f7f7f7; border: 1px solid var(--ink); border-radius: 6px; cursor: pointer; }
.garage-recap__more:hover { background: #fff; }
.garage-recap__more:active { background: var(--ink); color: #fff; }
.garage-recap__more[hidden] { display: none; }

/* The cars: pixel sprites at 1x (tools/make_garage_cars.py), not the 32px app icon */
.ui-cover--car img { width: auto; height: auto; max-width: 100%; }

/* Vehicle pages: picture, name, plate, then Year / Owned since / Years owned / Mileage */
.garage-parts[hidden] { display: none; }
.garage-parts__list { margin: 8px 0 0; padding: 0; list-style: none; border: 1.5px solid var(--line, #313131); border-radius: 8px; background: #fff; overflow: hidden; }
.garage-parts__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 12px; }
.garage-parts__row + .garage-parts__row { border-top: 1px solid #cecece; }
.garage-parts__n { font: 700 14px/1.35 var(--font-ui); }
.garage-parts__qty { font: 15px/1.35 var(--font-lcd); color: #525252; }
.garage-parts__meta { grid-column: 1 / -1; font-size: 13px; line-height: 1.4; color: #313131; }
.garage-head__pic:empty { display: none; }
.garage-head__car--none { width: 32px; height: 32px; }
.garage-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; text-align: left; }
.garage-facts[hidden] { display: none; }
@media (min-width: 620px) { .garage-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.garage-facts > div { padding: 8px 10px; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; }
.garage-facts dt { font-size: 12.5px; color: #525252; }
.garage-facts dd { margin: 2px 0 0; font: 22px/1 var(--font-lcd); white-space: nowrap; }
.garage-head__link { margin-top: 10px; font-size: 14px; }
.garage-head__link a { color: var(--ink); font-weight: 600; }
.garage-head__link[hidden] { display: none; }

/* Wall photos of this car: Polaroid tiles, Wall thumbs, grey.css greys them. Always 5 across. Square frame, no crop. */
.garage-polas { margin: 14px 0 0; padding: 12px 12px 14px; }
.garage-polas[hidden] { display: none; }
.garage-polas__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 10px; }
.garage-pola { display: block; min-width: 0; padding: 8px 8px 10px; background: #fff; border: 1px solid #cecece; box-shadow: 2px 3px 0 rgba(0, 0, 0, .16); color: inherit; text-decoration: none; }
.garage-pola img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; }
.garage-pola time { display: block; margin-top: 7px; font: 13px/1 var(--font-lcd); color: #525252; text-align: center; }
a.garage-pola:hover { background: #f7f7f7; }
@media (max-width: 640px) {
  .garage-polas { margin: 8px 0 0; padding: 0; }
  .garage-polas__list { gap: 4px 3px; }
  .garage-pola { padding: 3px 3px 4px; box-shadow: 1px 1px 0 rgba(0, 0, 0, .16); }
  .garage-pola time { margin-top: 3px; font-size: 11px; }
  .garage-polas .garage-recap__foot { margin-top: 6px; }
}
.garage-listing[hidden] { display: none; }
.garage-listing__ad { margin: 8px 0 0; padding: 0; list-style: none; }
.garage-listing .garage-ad { margin: 0; padding: 0; border-bottom: 0; }
.garage-listing .garage-ad__pic { max-width: 320px; }
.garage-ad__sold { display: block; margin: 0 0 4px; font: 700 22px/1 var(--font-ui); letter-spacing: .08em; }
@media (max-width: 420px) { .garage-facts > div { padding: 7px 8px; } .garage-facts dt { font-size: 11.5px; } .garage-facts dd { font-size: 18px; } }

/* /garage/: On the road as a gallery (no heading), then Projects, then Yard as folded cards */
.garage-gallery { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.garage-gallery[hidden] { display: none; }
@media (min-width: 720px) { .garage-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; } }
.garage-gallery > li { min-width: 0; }
.garage-gallery .ui-cover--icon img { width: 128px; height: 128px; max-width: 86%; max-height: 86%; }
.garage-gallery .ui-tile__t { font-size: 15px; }
.garage-gallery .ui-tile__d { font-size: 17px; color: var(--ink); }
.garage-yard[hidden], [data-garage-projects][hidden] { display: none; }

/* vanity plate: grokbot's pixel art when it has drawn one, else the letters on a plain plate */
.plate { display: inline-block; padding: 3px 10px 2px; background: #fff; border: 2px solid var(--ink); border-radius: 5px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #9c9c9c;
  font: 22px/1 var(--font-lcd); letter-spacing: .12em; color: var(--ink); white-space: nowrap; }
.plate--big { padding: 5px 14px 4px; font-size: 30px; }
img.plate--art { padding: 0; border: 0; box-shadow: none; border-radius: 0; height: 44px; width: auto; image-rendering: pixelated; vertical-align: middle; }
.garage-head__plate { margin-top: 10px; }
.garage-head__plate[hidden] { display: none; }

/* the Willy Build projects that link this car: one small box each, the Gantt lives on /build/<slug>/ */
.garage-projects { display: grid; gap: 10px; margin-top: 14px; }
.garage-projects[hidden] { display: none; }
/* a project that links this car: the Willy Build card (build/build.css .bproj), right on the car page */
.garage-projects .bproj { margin: 0; }

/* the RUIND sticker at the foot of /garage/: greyscale gradient, die-cut white edge, square corners, a few degrees off, bottom-right corner peeling */
.garage-sticker { position: relative; width: min(340px, 84%); margin: 34px auto 10px; transform: rotate(-4deg); filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, .25)); }
.garage-sticker__face { display: block; padding: 14px 16px; border: 5px solid #fff; border-radius: 0; outline: 1.5px solid var(--ink);
  background: radial-gradient(120% 90% at 30% 20%, #f7f7f7 0, #cecece 45%, #8c8c8c 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 58px), calc(100% - 58px) 100%, 0 100%); }
.garage-sticker__face img { display: block; width: 100%; height: auto; filter: grayscale(1) drop-shadow(0 0 0 #fff) drop-shadow(1px 1px 0 #fff) drop-shadow(-1px -1px 0 #fff); }
/* the lifted corner: the sticker's back (paper grey) folded up over the cut */
.garage-sticker__peel { position: absolute; right: 0; bottom: 0; width: 58px; height: 58px;
  background: linear-gradient(315deg, transparent 50%, #e6e6e6 50%, #fff 64%, #c5c5c5 100%);
  border-radius: 0 0 0 0; filter: drop-shadow(-3px -2px 2px rgba(0, 0, 0, .3)); transform-origin: 0 0; }
/* Tesla: Lifetime is four, two by two on a phone */
.garage-stats__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .garage-stats__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.garage-stats__ic { width: 16px; height: 16px; flex: none; vertical-align: -2px; margin-right: 4px; image-rendering: pixelated; }
.ui-sec__h .garage-stats__ic { margin-right: 0; }
/* battery: full range by month (garage.js draws the SVG) */
.garage-bat[hidden] { display: none; }
.garage-bat__chart { margin-top: 8px; padding: 8px 8px 4px; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; }
.garage-bat__chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.bat__bar { fill: #212121; }
.bat__grid { stroke: #bdbdbd; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.bat__tick { font: 18px var(--font-lcd); fill: #636363; }

/* A car's log (garage/cars.js): one row per day, newest first. Lee's events, then what the car did that day. */
.garage-log[hidden] { display: none; }
.garage-log__days { margin: 8px 0 0; padding: 0; list-style: none; border: 1.5px solid var(--line, #313131); border-radius: 8px; background: #fff; overflow: hidden; }
.garage-log__day { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 9px 12px; }
.garage-log__day + .garage-log__day { border-top: 1px solid #cecece; }
.garage-log__d { font: 15px/1.35 var(--font-lcd); color: #525252; white-space: nowrap; }
.garage-log__ev { display: block; font: 700 14px/1.35 var(--font-ui); }
.garage-log__note { display: block; margin: 1px 0 3px; font-size: 13px; line-height: 1.4; color: #313131; }
.garage-log__nums { display: block; font: 15px/1.35 var(--font-lcd); }

/* Online Finds: a page of newspaper classifieds. Newsprint box, masthead between rules, a category bar,
   then the ads in narrow columns split by hairlines. Each ad: a 3:2 picture when grokbot sent one, TITLE in caps, the details run on, the source last. */
.garage-ads { margin: 0 0 26px; padding: 12px 14px 14px; background: #f7f7f7; border: 1.5px solid var(--line, #313131); border-radius: 4px; scroll-margin-top: 60px; }
.garage-ads[hidden] { display: none; }
.garage-ads__mast { scroll-margin-top: 60px; padding: 2px 0 5px; text-align: center; border-bottom: 4px double var(--ink, #101010); }
.garage-ads__mast h2 { font: 400 clamp(26px, 6vw, 34px)/1 var(--font-ui); letter-spacing: .02em; text-transform: uppercase; }
.garage-ads__cat { margin: 8px 0 10px; padding: 3px 8px 2px; background: var(--ink, #101010); color: #f7f7f7; font: 400 15px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.garage-ads__list { margin: 0; padding: 0; list-style: none; columns: 2 180px; column-gap: 20px; column-rule: 1px solid #8c8c8c; }
.garage-ads__cont { margin: 0 0 8px; padding: 0; border: 0; background: none; font: 400 17px/1 var(--font-ui); letter-spacing: .02em; text-transform: uppercase; break-before: column; break-after: avoid; }   /* same type as a find title; the break still opens the second column */
.garage-ad { break-inside: avoid; padding: 0 0 9px; margin: 0 0 9px; border-bottom: 1px solid #b5b5b5; }
.garage-ad__a { display: block; color: var(--ink, #101010); text-decoration: none; font: 19px/1.05 var(--font-lcd); }
.garage-ad__a:hover .garage-ad__t, .garage-ad__a:focus-visible .garage-ad__t { text-decoration: underline; }
.garage-ad__pic { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; margin: 0 0 6px; object-fit: cover; image-rendering: pixelated; border: 1px solid var(--ink, #101010); background: #fff; }
.garage-ad__t { font: 400 17px/1 var(--font-ui); text-transform: uppercase; letter-spacing: .02em; }
.garage-ad__b { color: #212121; }
.garage-ad__src { display: block; margin-top: 3px; font: 400 12px/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: #525252; }
@media (min-width: 900px) { .garage-ads__list { columns: 3; } }

/* Charge: the level the car last reported, as a bar */
.garage-chg[hidden] { display: none; }
.garage-chg .ui-sec__h, .garage-bat .ui-sec__h { margin: 0 0 10px; }
.garage-chg__bar { position: relative; height: 34px; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; overflow: hidden; }
.garage-chg__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(90deg, #424242 0 6px, #313131 6px 8px); }
.garage-chg__pct { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 1px 6px; font: 24px/1 var(--font-lcd); background: #fff; border: 1px solid var(--line, #313131); border-radius: 4px; }
.garage-stats .ui-sec__h { font: 700 15px/1 var(--font-ui); }

/* Self-driving and Sun driving: two cards, then the charge-level bar for the share of miles */
.garage-fsd[hidden], .garage-sun[hidden] { display: none; }
.garage-fsd .ui-sec__h, .garage-sun .ui-sec__h { margin: 0 0 10px; }
.garage-fsd .garage-stats__grid, .garage-sun .garage-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.garage-fsd .garage-chg__bar, .garage-sun .garage-chg__bar { margin-top: 10px; }
.garage-fsd .garage-recap table { margin-top: 10px; }
.garage-fsd__streak { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 0; padding: 6px 8px; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; }
.garage-fsd__streak span:first-child { font: 400 14px/1.2 var(--font-ui); }
.garage-fsd__streak [data-stat] { font: 20px/1 var(--font-lcd); }
.garage-fsd__streak[hidden] { display: none; }
.garage-fsd .garage-fsd__streak + table { margin-top: 6px; }
.garage-fsd__barc { width: 34%; }
.garage-fsd__bar { display: block; height: 12px; background: #efefef; border: 1px solid var(--line, #313131); border-radius: 3px; overflow: hidden; }
.garage-fsd__bar > span { display: block; height: 100%; background: #313131; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Service (garage/cars.js): mileage, what's due, the history. Due soon is mid grey, overdue is inverted. */
.garage-svc[hidden], .garage-svc [hidden] { display: none; }
.garage-svc__mi { margin-top: 6px; font: 20px/1.1 var(--font-lcd); }
.garage-svc__due { width: 100%; margin-top: 8px; border-collapse: separate; border-spacing: 0; background: #fff; border: 1.5px solid var(--line, #313131); border-radius: 8px; overflow: hidden; table-layout: fixed; }
.garage-svc__due th, .garage-svc__due td { padding: 7px 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.garage-svc__due thead th { font: 700 12px/1.2 var(--font-ui); color: #525252; border-bottom: 1.5px solid var(--line, #313131); }
.garage-svc__due thead th:first-child { width: 40%; }
.garage-svc__due tbody tr + tr > * { border-top: 1px solid #cecece; }
.garage-svc__due tbody th { font: 700 14px/1.3 var(--font-ui); }
.garage-svc__due tbody td { font: 16px/1.2 var(--font-lcd); }
.garage-svc__item, .garage-svc__due td > span { display: block; }
.garage-svc__sub { display: block; margin-top: 2px; font: 400 12.5px/1.3 var(--font-ui); color: #525252; }
.garage-svc__row.is-soon > * { background: #dedede; }
.garage-svc__row.is-overdue > * { background: var(--ink, #101010); color: #fff; }
.garage-svc__row.is-overdue .garage-svc__sub { color: #dedede; }
.garage-svc__h { margin-top: 14px; font: 700 15px/1.2 var(--font-ui); }
.garage-svc__f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.garage-svc__fb { min-height: 32px; padding: 4px 12px; font: 600 14px/1 var(--font-ui); color: var(--ink); background: #f7f7f7; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; }
.garage-svc__fb[aria-pressed="true"] { background: var(--ink); color: #fff; }
