/* Shared components for the three mockups: pollution / safety bars, buttons, car cards. Colours come from each page's tokens. */
:root { --accent: #f57b20; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; direction: rtl; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(100% - 32px, 1320px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* pollution scale 1 (clean) to 15 (dirty) */
.pbar, .sbar { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1; }
.pbar.small, .sbar.small { font-size: 11px; gap: 6px; }
.plabel { color: var(--muted); white-space: nowrap; }
.psegs, .ssegs { display: inline-flex; gap: 2px; }
.pseg { display: block; width: 10px; height: 14px; border-radius: 2px; opacity: .28; }
.small .pseg { width: 7px; height: 10px; }
.pseg.on { opacity: 1; transform: scaleY(1.45); box-shadow: 0 0 0 1.5px var(--bg, #000); }
.pseg.s1 { background: #0b8f3a; } .pseg.s2 { background: #1f9a3c; } .pseg.s3 { background: #35a63d; } .pseg.s4 { background: #55b23b; } .pseg.s5 { background: #7cbd34; }
.pseg.s6 { background: #a3c42b; } .pseg.s7 { background: #c4c824; } .pseg.s8 { background: #dcc21e; } .pseg.s9 { background: #e8b31a; } .pseg.s10 { background: #ec9d19; }
.pseg.s11 { background: #ee8419; } .pseg.s12 { background: #ec6a1c; } .pseg.s13 { background: #e64f20; } .pseg.s14 { background: #dc3626; } .pseg.s15 { background: #c8202c; }
.sseg { display: block; width: 10px; height: 14px; border-radius: 2px; background: currentColor; opacity: .18; }
.small .sseg { width: 7px; height: 10px; }
.sseg.on { opacity: 1; color: var(--accent); }
.pval { font-variant-numeric: tabular-nums; min-width: 1.6em; text-align: center; }
.pdemo { font-style: normal; font-size: 10px; color: var(--muted); border: 1px dashed var(--line); padding: 1px 5px; border-radius: 999px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--radius, 10px); border: 1px solid transparent; font-weight: 600; white-space: nowrap; cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-accent { background: var(--accent); color: #141210; }
.btn-accent:hover { background: #ff8a33; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-dark { background: var(--fg); color: var(--bg); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }

/* car card */
.car { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 10px); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.car-img { aspect-ratio: 4 / 3; overflow: hidden; background: #222; }
.car-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.car:hover .car-img img { transform: scale(1.04); }
.car-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.car-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.car-hand { color: var(--accent-text, var(--accent)); font-weight: 600; }
.car-title { margin: 0; font-size: 19px; line-height: 1.15; font-weight: 700; }
.car-title span { font-weight: 400; color: var(--muted); }
.car-meta { margin: 0; font-size: 13px; color: var(--muted); }
.car-actions { display: flex; gap: 8px; margin-top: 6px; }
.car-actions .btn { flex: 1; min-height: 40px; padding: 0 10px; font-size: 14px; }

/* rail (horizontal scroll-snap) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 300px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* forms */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select { min-height: 46px; padding: 0 14px; border-radius: var(--radius, 10px); border: 1px solid var(--line); background: var(--surface); color: var(--fg); width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input::placeholder { color: var(--muted); opacity: .8; }
.field .help { font-size: 12px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
