/* 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 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-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; }
@media (max-width: 420px) { .garage-facts > div { padding: 7px 8px; } .garage-facts dt { font-size: 11.5px; } .garage-facts dd { font-size: 18px; } }

/* /garage/: the first four as a gallery (big sprites, mileage, years owned), the rest as list 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-rest[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; }

/* project vehicles: the Gantt under the facts */
.garage-project { margin-top: 14px; }
.garage-project[hidden] { display: none; }

/* 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: 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 has four (gas saved), 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)); } }
/* 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); }
