/* Vehicle site (tools/build_vehicle_site.py) on top of app.css: model-line cards, key-fact tiles,
   colour swatches, trim tables, compare slots and rival-pair links. The accent colour comes from
   sites/<key>.json (inline :root style written by the builder). */
.bar .logo span, .crumb a:hover { color: var(--accent) }
.spec svg, .tile svg, .gh svg { stroke: var(--accent) }
.dots i.on { background: var(--accent) }

/* list: compact model-line cards (photo on top, name, key specs, price + button on one line) */
.vfilters .row { row-gap: 6px }
.vfilters select { max-width: 100% }
.budget { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center }
.vcard { grid-template-rows: auto 1fr auto }
.vmedia { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--media); overflow: hidden; text-decoration: none }
.vmedia img, .vmedia .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; display: block }
.vmedia .ph { font: 600 1.6rem var(--f-display); color: #6b7487 }
.vspec { color: var(--muted); font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.vcard .foot { flex-wrap: nowrap }
.vcard .pricebox { min-width: 0; flex-wrap: nowrap; white-space: nowrap }
.vcard .actions { flex: none; flex-wrap: nowrap }
.lbl { font-size: 12px; color: var(--muted) }
.tray .pill .x { border: 0; background: none; color: inherit; padding: 0 0 0 4px; font-size: 14px; line-height: 1 }
.tray .sel .pill { display: inline-flex; align-items: center; max-width: 100%; overflow-wrap: anywhere }

/* trim page */
.vtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px }
.vtile { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; display: grid; gap: 2px; min-width: 0 }
.vtile b { font: 500 11px var(--f-data); color: var(--muted); letter-spacing: .04em }
.vtile span { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px }
.swatches li { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere }
.swatches .swp { margin-left: auto; color: var(--price); font-weight: 600 }
.sw { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--c, transparent); border: 1px solid var(--line); box-shadow: inset 0 0 0 1px #0001 }
.sw.none { background: repeating-linear-gradient(45deg, var(--chip) 0 4px, var(--surface) 4px 8px) }
.wrap > .swatches { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 6px 0 4px }
.rawspec summary h3 { flex: 1 }
.vcalc { min-width: 0 }
table.vtable tr.old th, table.vtable tr.old td { color: var(--muted) }
.vtable .vprice.none, .cprice .none { color: var(--muted); font-weight: 400 }
.variants .tablewrap, .wrap > .tablewrap { margin-top: 4px }

/* model-line page */
.famhead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: center; margin: 4px 0 16px }
.famimg .media { height: auto; aspect-ratio: 16 / 9; border-radius: 10px }
.faminfo { display: grid; gap: 6px; min-width: 0 }
.faminfo h1 { font-size: clamp(1.4rem, 2.6vw, 2rem) }
.faminfo .sub { margin: 0 }
.famimg .credit { margin-top: 4px }
@media (max-width: 760px) { .famhead { grid-template-columns: minmax(0, 1fr) } }

/* compare */
table.cmpt { font-size: 13.5px }
table.cmpt td { min-width: 190px }
table.cmpt tr.grp th { background: var(--chip); color: var(--ink); font: 600 .9rem var(--f-display); padding-block: 6px; position: sticky; left: 0 }
table.cmpt.only tbody tr:not(.diff):not(.grp) { display: none }
.cmphead.slot select { width: 100%; font-size: 13px; padding: 5px 8px }
.cmpimg.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); background: var(--bg) }
.cmpt td.cprice, .cmpt .cprice { color: var(--price); font-weight: 600 }
.pairs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px }
.pairs a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere }
.pairs a:hover { border-color: var(--accent) }
.pairs b { color: var(--accent); font: 600 12px var(--f-data); margin: 0 4px }
h2.sec { margin-top: 18px }
.wrap > .grid { margin-top: 10px }
@media (max-width: 560px) {
  table.cmpt td { min-width: 150px }
  table.cmpt th { white-space: normal; min-width: 84px; max-width: 96px; overflow-wrap: anywhere; font-size: 12.5px }
}
/* phones: the filter block is several rows tall, so it scrolls away instead of covering the cards */
@media (max-width: 860px) { .vfilters { position: static } }
/* ECO Sticker (สศอ.) label box on trim pages */
.ecobox .gh .pill { font-size: 12px }
.ecofoot { display: grid; gap: 8px; justify-items: start; padding: 2px 14px 12px }
.ecofoot .note { max-width: none }
