/* 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 }

/* ================================================================ MotorDee look (09-11-2026)
   asphalt top bar + footer, orange accent, rounded cards with a little lift, hero with the mascot
   (น้องดีดี้, assets/motordee-mascot.svg), badges for EV / CO2 / E20-E85-B20. */
:root { --bg: #f5f4f1; --line: #e2dfd8; --chip: #efece6; --asphalt: #16181d; --asphalt-2: #23262e; --road: #facc15;
  --eco: #15803d; --eco-bg: #e7f6ec; --ev: #0369a1; --ev-bg: #e0f2fe; --fx: #92400e; --fx-bg: #fef3c7; --r: 14px }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111216; --surface: #1a1c22; --line: #2c2f38; --chip: #24272f;
  --eco: #6ee7a0; --eco-bg: #12301f; --ev: #7dd3fc; --ev-bg: #0c2a3d; --fx: #fcd34d; --fx-bg: #3a2c0b } }
:root[data-theme="dark"] { --bg: #111216; --surface: #1a1c22; --line: #2c2f38; --chip: #24272f;
  --eco: #6ee7a0; --eco-bg: #12301f; --ev: #7dd3fc; --ev-bg: #0c2a3d; --fx: #fcd34d; --fx-bg: #3a2c0b }
body { background: var(--bg) }

/* top bar: full-bleed asphalt strip without widening the page */
.mdbar { position: sticky; top: 0; z-index: 20; background: var(--asphalt); color: #f3f4f6; margin-top: -20px; margin-bottom: 14px;
  padding-block: 8px; box-shadow: 0 0 0 100vmax var(--asphalt); clip-path: inset(0 -100vmax); border-bottom: 3px solid var(--accent) }
.mdbar .logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; font: 700 1.3rem var(--f-display); letter-spacing: .01em }
.mdbar .logo span { color: #fb923c }
.mdbar .mascot-ico { width: 40px; height: 36px; margin-block: -4px }
.mdbar .cats { display: flex; gap: 6px; flex-wrap: wrap }
.mdbar .chip { background: transparent; color: #e5e7eb; border-color: #3a3e48; padding: 8px 13px }
.mdbar .chip:hover { border-color: #fb923c; color: #fff }
.mdbar .chip[aria-current="page"] { background: #fb923c; border-color: #fb923c; color: #1b0d04 }
.mdbar .chip.hot { border-color: #facc15; color: #facc15 }
.mdbar .chip.hot[aria-current="page"] { background: #facc15; color: #1b1300 }
.mdbar .btn { background: #fb923c; color: #1b0d04; border-color: #fb923c }
.mdbar .sister summary, .mdbar details { color: #cbd5e1 }
@media (max-width: 720px) {
  .mdbar { position: static }
  .mdbar .cats { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: -2px }
  .mdbar .cats::-webkit-scrollbar { display: none }
  .mdbar .chip { flex: none }
}

/* cards */
.card { border-radius: var(--r); border-color: var(--line); transition: transform .15s ease, box-shadow .15s ease }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px #0006 }
.vmedia { background: linear-gradient(180deg, var(--media) 0 72%, #dcdfe5 72% 100%) }
.vcard .name { font: 600 1.05rem/1.3 var(--f-display) }
.price { font-family: var(--f-display) }
.bdgs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px }
.bdg { font: 600 11px/1 var(--f-body); padding: 4px 7px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap }
.bdg.co2 { background: var(--eco-bg); color: var(--eco) }
.bdg.ev { background: var(--ev-bg); color: var(--ev) }
.bdg.hy { background: var(--eco-bg); color: var(--eco) }
.bdg.fx { background: var(--fx-bg); color: var(--fx) }
.vtile { border-radius: 10px }
.vtile.eco { border-left-color: var(--eco); background: linear-gradient(90deg, var(--eco-bg), var(--surface) 70%) }
.gcard, .buybox, .filters.vfilters { border-radius: var(--r) }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none } }

/* hero (home, CO2 page) */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px;
  background: radial-gradient(120% 140% at 100% 0%, #3b2414 0, var(--asphalt) 55%); color: #f8fafc; border-radius: 22px;
  padding: clamp(20px, 4vw, 44px); overflow: hidden; margin-bottom: 16px }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 4.4vw, 3rem); line-height: 1.12 }
.hero h1 em { font-style: normal; color: #fb923c }
.hero .sub { color: #cbd5e1; max-width: 60ch; margin-top: 10px }
.kicker { font: 600 12px/1.2 var(--f-data); letter-spacing: .08em; text-transform: uppercase; color: #facc15; margin: 0 0 8px }
.hero-art { position: relative; display: grid; justify-items: center; align-self: end }
.hero-mascot { width: clamp(150px, 22vw, 260px); height: auto; position: relative; z-index: 1; filter: drop-shadow(0 12px 18px #0007) }
.ecohero .hero-mascot { width: clamp(110px, 14vw, 180px) }
.road { position: absolute; left: -40%; right: -40%; bottom: 8px; height: 10px;
  background: repeating-linear-gradient(90deg, var(--road) 0 34px, transparent 34px 60px); opacity: .8; border-radius: 4px }
.bubble { background: #fff; color: #1f2937; font-size: 14px; line-height: 1.35; padding: 8px 12px; border-radius: 14px; justify-self: start;
  position: relative; margin-bottom: 6px; box-shadow: 0 6px 16px -8px #0008; max-width: 210px }
.bubble b { color: #c2410c }
.bubble::after { content: ""; position: absolute; left: 34px; bottom: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0 }
.hsearch { margin-top: 18px; display: grid; gap: 8px; max-width: 640px }
.hcats { display: flex; gap: 14px; font-size: 14px; color: #e2e8f0 }
.hcats label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer }
.hcats input { accent-color: #fb923c }
.hbox { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 14px }
.hbox input[type=search] { border: 0; background: transparent; color: #111827; font-size: 16px; padding: 10px 12px; flex: 1 1 auto }
.hbox input::placeholder { color: #6b7280 }
.hbox .btn { border-radius: 10px; padding: 10px 18px; font-weight: 600 }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px }
.quick .chip { background: #ffffff14; border-color: #ffffff2e; color: #f1f5f9 }
.quick .chip:hover { background: #fb923c; color: #1b0d04; border-color: #fb923c }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px }
  .hero-art { grid-row: 1; justify-self: end; margin: -6px -4px -8px 0; grid-template-columns: auto auto; align-items: end; gap: 6px }
  .hero-art .bubble { order: -1; margin: 0 0 40px; font-size: 13px }
  .homehero .hero-mascot { width: 128px }
  .ecohero .hero-art, .ecohero > .hero-mascot { display: none }
  .road { left: -200%; right: -20% }
}

/* home: stats, Motor Expo band, feature tiles, brand pills */
.statstrip { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px }
.statstrip li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid }
.statstrip b { font: 700 1.35rem/1.1 var(--f-display); color: var(--ink) }
.statstrip span { font-size: 12.5px; color: var(--muted) }
.expoband { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; text-decoration: none; color: #1b1300;
  background: repeating-linear-gradient(135deg, #facc15 0 22px, #fbbf24 22px 44px); border-radius: 16px; padding: 14px 18px; margin-bottom: 16px;
  box-shadow: inset 0 0 0 2px #00000014 }
.expoband b { font: 700 clamp(1rem, 2.4vw, 1.3rem)/1.25 var(--f-display); grid-column: 1 }
.expo-k { font: 600 12px var(--f-data); grid-column: 1 }
.expo-go { grid-row: 1 / span 2; grid-column: 2; background: var(--asphalt); color: #facc15; padding: 10px 16px; border-radius: 999px; font-weight: 600; white-space: nowrap }
@media (max-width: 520px) { .expoband { grid-template-columns: 1fr } .expo-go { grid-row: auto; grid-column: 1; justify-self: start; margin-top: 8px } }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-bottom: 8px }
.feat { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; text-decoration: none; color: var(--ink) }
.feat:hover { border-color: var(--accent) }
.feat svg { grid-row: span 2; width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--chip); stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.feat b { font: 600 1rem var(--f-display) }
.feat span { font-size: 13px; color: var(--muted); line-height: 1.45 }
.brands .brandrow { display: grid; gap: 6px; margin-bottom: 10px }
.brands h3 { font: 600 .9rem var(--f-display); color: var(--muted); margin: 0 }
.brandpills { display: flex; flex-wrap: wrap; gap: 8px }
.bpill { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; text-decoration: none; color: var(--ink); min-width: 96px }
.bpill b { font: 600 .98rem var(--f-display) }
.bpill span { font-size: 12px; color: var(--muted) }
.bpill:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset }
.sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px }
.sechead a { font-size: 14px; font-weight: 500 }
.home h2.sec { font: 600 1.25rem var(--f-display); margin-top: 26px }
.calcgrid .catcard h2 { font-size: 1.05rem }

/* CO2 page */
.ecosec { margin-top: 10px }
.ecosec .sub { margin-bottom: 8px }
table.ecot td:first-child { white-space: nowrap }
table.ecot .num b { color: var(--eco); font-family: var(--f-display); font-size: 1.05rem }
.rk { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--chip); font: 600 11px var(--f-data); margin-right: 6px; color: var(--muted) }
.fxlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px }
.fxlist li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid }
.fxlist a { font-weight: 600; text-decoration: none; color: var(--ink) }
.fxlist a:hover { color: var(--accent) }
.howlist { padding-left: 1.1em; display: grid; gap: 6px; max-width: 80ch }
.lowco2 { margin-top: 6px }

/* footer */
.mdfoot { background: var(--asphalt); color: #cbd5e1; margin-top: 40px; padding: 26px max(16px, env(safe-area-inset-left, 0px)) calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 3px solid var(--accent); display: block }
.mdfoot-in { max-width: 1320px; margin: 0 auto; display: grid; gap: 16px }
.mdfoot-brand { display: flex; gap: 14px; align-items: center }
.mdfoot-brand p { margin: 4px 0 0; font-size: 13.5px; max-width: 70ch; color: #aab4c3 }
.mdfoot .logo { color: #fff; font: 700 1.2rem var(--f-display) }
.mdfoot .logo span { color: #fb923c }
.mdfoot-nav { display: flex; flex-wrap: wrap; gap: 8px 18px }
.mdfoot a { color: #e5e7eb }
.mdfoot-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: #8b95a5; margin: 0; align-items: center }
.mdfoot-legal button { background: none; border: 1px solid #3a3e48; color: #e5e7eb; border-radius: 999px; padding: 4px 10px; font-size: 12.5px }
.mdbar .logo .lt { display: inline }
.hsearch, .hbox { min-width: 0; width: 100% }
.hbox input[type=search] { min-width: 0; width: 100% }
.hbox .btn { flex: none }
@media (max-width: 560px) {
  .brandpills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .bpill { min-width: 0 }
  .statstrip { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
