/* Al Mahrouqi Car Rental demo. Tokens, then film stage, captions, sections, footer. */
:root {
  --bg: #0a0b0d;
  --panel: #111318;
  --panel-2: #171a20;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #ffffff;
  --muted: #c6cbd3;            /* very light grey secondary text */
  --dim: #8b919b;
  --accent: #5aa9ff;
  --accent-hi: #7dbcff;
  --accent-ink: #06121f;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --arabic: "Tajawal", "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --bar-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + env(safe-area-inset-top) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 500; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none; }
html[lang="ar"] body { font-family: var(--arabic); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.2; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 50; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip:focus { top: calc(env(safe-area-inset-top) + 10px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- eyebrows ---------- */
.eyebrow, .kicker { margin: 0 0 14px; font-size: .68rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
html[lang="ar"] .eyebrow, html[lang="ar"] .kicker { letter-spacing: 0; font-size: .82rem; }

/* ---------- pill buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .9rem; letter-spacing: -.01em; white-space: nowrap; cursor: pointer; transition: background .25s, transform .25s var(--ease), box-shadow .25s; }
@media (hover: hover) { .pill:hover { background: var(--accent-hi); box-shadow: 0 8px 30px rgba(90, 169, 255, .3); } }
.pill:active { transform: scale(.97); }
.pill--sm { min-height: 44px; padding: 0 18px; font-size: .82rem; }
.pill--wide { width: 100%; min-height: 54px; font-size: 1rem; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* =============================== TOP BAR =============================== */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) calc(env(safe-area-inset-right) + var(--pad)) 0 calc(env(safe-area-inset-left) + var(--pad));
  background: linear-gradient(rgba(10, 11, 13, .78), rgba(10, 11, 13, 0));
  transition: background .35s, border-color .35s, -webkit-backdrop-filter .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.bar.is-solid { background: rgba(10, 11, 13, .78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.crown { width: 26px; height: 26px; fill: var(--accent); flex: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; }
.wm-en { font-weight: 800; font-size: 1rem; letter-spacing: .12em; }
.wm-ar { display: none; font-family: var(--arabic); font-weight: 800; font-size: 1.25rem; }
.wordmark small { margin-top: 4px; font-size: .56rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .wm-ar { display: block; }
html[lang="ar"] .wm-en { order: 2; margin-top: 3px; font-size: .58rem; letter-spacing: .22em; color: var(--muted); }
html[lang="ar"] .wordmark small { display: none; }
.bar-nav { display: flex; align-items: center; gap: clamp(8px, 1.8vw, 26px); }
.bar-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: .84rem; font-weight: 600; color: var(--muted); transition: color .2s; }
@media (hover: hover) { .bar-link:hover { color: #fff; } }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(10, 11, 13, .45); }
.lang button { min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 700; cursor: pointer; }
.lang button[lang="ar"] { font-family: var(--arabic); font-size: .9rem; }
.lang button[aria-pressed="true"] { background: rgba(255, 255, 255, .14); color: #fff; }
.pill--bar .short { display: none; }

/* =============================== FILM STAGE =============================== */
.scroll { height: 1000vh; }
.stage { position: fixed; inset: 0; z-index: 1; overflow: hidden;
  background:
    radial-gradient(90% 70% at 70% 30%, rgba(90, 169, 255, .10), transparent 60%),
    radial-gradient(80% 60% at 20% 90%, rgba(255, 170, 90, .07), transparent 60%),
    linear-gradient(180deg, #14171d 0%, #0a0b0d 70%); }
.stage::before { content: ""; position: absolute; inset: 0; background: url("../img/poster.jpg") center / cover no-repeat; }
.film { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; display: block; pointer-events: none; opacity: 0; transition: opacity .5s; }
.film.has-frame { opacity: 1; }
.shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 11, 13, .88) 0%, rgba(10, 11, 13, .45) 26%, rgba(10, 11, 13, 0) 52%),
    linear-gradient(to bottom, rgba(10, 11, 13, .55) 0%, rgba(10, 11, 13, 0) 18%); }
.stage.is-covered { opacity: 0; pointer-events: none; }

/* captions */
.caption { position: absolute; z-index: 3; bottom: calc(env(safe-area-inset-bottom) + clamp(28px, 7vh, 80px)); opacity: 0; visibility: hidden; will-change: opacity, transform; }
.caption[data-shot="0"] { opacity: 1; visibility: visible; }
.caption--head { inset-inline-start: calc(var(--pad) + env(safe-area-inset-left)); inset-inline-end: calc(var(--pad) + env(safe-area-inset-right)); max-width: 60rem; }
.headline { font-size: clamp(2.7rem, 8.4vw, 7.6rem); line-height: .94; letter-spacing: -.045em; text-shadow: 0 6px 40px rgba(0, 0, 0, .45); }
.headline span { display: block; }
html[lang="ar"] .headline { line-height: 1.12; letter-spacing: 0; font-size: clamp(2.9rem, 9vw, 7.4rem); }
.sub { margin: clamp(14px, 2.2vh, 22px) 0 0; max-width: 34rem; font-size: clamp(.98rem, 1.3vw, 1.12rem); color: var(--muted); text-shadow: 0 1px 14px rgba(0, 0, 0, .7); }
.hint { display: inline-flex; align-items: center; gap: 10px; margin: clamp(16px, 3vh, 28px) 0 0; font-size: .68rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.hint::before { content: ""; width: 1px; height: 30px; background: linear-gradient(#fff, transparent); animation: drop 2.2s var(--ease) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; opacity: 0; } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

.glass { background: rgba(14, 16, 20, .58); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .45); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(14, 16, 20, .9); } }
.caption--card { inset-inline-end: calc(var(--pad) + env(safe-area-inset-right)); width: min(380px, calc(100vw - 2 * var(--pad))); }
.spec { padding: 22px 22px 20px; }
.spec h3 { font-size: 1.6rem; }
.spec-line { margin: 10px 0 0; font-size: .92rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--line); }
.stats li { display: flex; flex-direction: column; gap: 3px; }
.stats b { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.stats span { font-size: .76rem; color: var(--dim); }
.caption--mini { inset-inline-start: calc(var(--pad) + env(safe-area-inset-left)); width: min(340px, calc(100vw - 2 * var(--pad))); }
.mini { padding: 20px; }
.mini .crown { width: 22px; height: 22px; margin-bottom: 10px; }
.mini p { margin: 0 0 16px; font-size: 1.15rem; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.spec-note { margin: 12px 0 0; font-size: .68rem; line-height: 1.35; color: var(--dim); }
html[dir="rtl"] .caption--head, html[dir="rtl"] .caption--mini { inset-inline-start: calc(var(--pad) + env(safe-area-inset-right)); }
html[dir="rtl"] .caption--head { inset-inline-end: calc(var(--pad) + env(safe-area-inset-left)); }
html[dir="rtl"] .caption--card { inset-inline-end: calc(var(--pad) + env(safe-area-inset-left)); }

.progress { position: absolute; z-index: 4; top: 50%; inset-inline-end: calc(clamp(10px, 2vw, 26px) + env(safe-area-inset-right)); width: 2px; height: 120px; margin-top: -60px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
html[dir="rtl"] .progress { inset-inline-end: calc(clamp(10px, 2vw, 26px) + env(safe-area-inset-left)); }
.progress i { display: block; width: 100%; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top; }

.loader { display: none; }
.js .loader { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); transition: opacity .7s var(--ease), visibility .7s; animation: loader-out .7s 6s forwards; }
.loader .crown { width: 40px; height: 40px; }
.loader-name { font-weight: 800; letter-spacing: .2em; font-size: 1.05rem; }
.loader i { position: relative; width: 120px; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.loader i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: load 1.2s var(--ease) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.js .loader.is-done { opacity: 0; visibility: hidden; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* =============================== PAGE =============================== */
.page { position: relative; z-index: 2; padding-bottom: clamp(80px, 12vh, 140px); background: var(--bg); box-shadow: 0 -60px 80px rgba(10, 11, 13, .95); }
.section { max-width: 1240px; margin: 0 auto; padding: clamp(72px, 12vh, 140px) calc(var(--pad) + env(safe-area-inset-right)) 0 calc(var(--pad) + env(safe-area-inset-left)); }
.sec-head { max-width: 46rem; margin-bottom: clamp(28px, 5vh, 52px); }
.sec-head h2 { font-size: clamp(2.1rem, 5vw, 3.9rem); }
.sec-sub { margin: 14px 0 0; font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.note { margin: 18px 0 0; font-size: .78rem; color: var(--dim); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .days-head span, .combo-label { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .field > span, html[lang="ar"] .days-head span, html[lang="ar"] .combo-label { letter-spacing: 0; font-size: .9rem; }
select { width: 100%; min-height: 50px; padding: 0 44px 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23c6cbd3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; color: #fff; font-weight: 600; -webkit-appearance: none; appearance: none; cursor: pointer; }
html[dir="rtl"] select { padding: 0 16px 0 44px; background-position: left 14px center; }
select:focus-visible { border-color: var(--accent); }

/* ---------- finder ---------- */
.finder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: stretch; }
.finder-controls { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(22px, 3vw, 40px); }
.combo { display: flex; flex-direction: column; gap: 10px; }
.combo-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 8px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2); }
.combo-value { text-align: center; font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrow { display: grid; place-items: center; width: 52px; height: 48px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; transition: background .2s; }
@media (hover: hover) { .arrow:hover { background: rgba(90, 169, 255, .22); } }
.arrow svg { width: 20px; height: 20px; }
.arrow--next svg { transform: scaleX(-1); }
html[dir="rtl"] .arrow svg { transform: scaleX(-1); }
html[dir="rtl"] .arrow--next svg { transform: none; }
.finder-controls .pill--wide { margin-top: 6px; }

.dial-panel { position: relative; aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(70% 70% at 50% 40%, #1a1e26, var(--panel) 70%); }
.dial { width: 78%; height: auto; overflow: visible; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.dial.is-open { opacity: .14; transform: scale(.9); }
.dial-outer { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 14; }
.dial-face { fill: #0d0f13; stroke: rgba(255, 255, 255, .14); stroke-width: 1.5; }
.tick { stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; stroke-linecap: round; }
.tick--big { stroke: #fff; stroke-width: 2.5; }
.dial-num { fill: var(--muted); font: 700 12px var(--sans); }
.dial-inner { fill: #131720; stroke: rgba(90, 169, 255, .35); stroke-width: 1.5; }
.needle { fill: var(--accent); }
.hub { fill: #fff; }
.marker { fill: var(--accent); }
.dial-idle { position: absolute; bottom: 7%; left: 0; right: 0; margin: 0; text-align: center; font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
html[lang="ar"] .dial-idle { letter-spacing: 0; font-size: .9rem; }
.dial-result { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.dial-result[hidden] { display: none; }
.dial-result .ph { position: absolute; inset: 0; margin: 0; border-radius: 0; aspect-ratio: auto; }
.dial-result .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 11, 13, .92) 0%, rgba(10, 11, 13, .2) 50%, rgba(10, 11, 13, 0) 70%); }
.dial-result .ph-name { display: none !important; }
.dial-result-text { position: relative; z-index: 1; padding: clamp(18px, 3vw, 32px); }
.dial-result-text h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.result-price { margin: 6px 0 16px; font-size: 1rem; font-weight: 700; color: var(--muted); }

/* ---------- photo placeholders ---------- */
.ph { position: relative; margin: 0; overflow: hidden; border-radius: 12px; aspect-ratio: 4 / 3;
  background: radial-gradient(80% 70% at 50% 35%, #1f242d, #0f1115 75%); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-name { display: none; }
.ph.is-missing img { visibility: hidden; }
.ph.is-missing .ph-name { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 800; letter-spacing: -.01em; color: rgba(255, 255, 255, .5); }
.ph.is-missing::before { content: ""; position: absolute; left: 50%; top: 50%; width: 46%; height: 18%; transform: translate(-50%, -110%); opacity: .1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 24'%3E%3Cpath d='M4 18h3a4 4 0 0 0 8 0h34a4 4 0 0 0 8 0h3v-5l-6-2-8-6H20l-9 6-7 2z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat; }
.dial-result .ph.is-missing { background: radial-gradient(70% 60% at 50% 30%, #222834, #0f1115 75%); }

/* ---------- compare ---------- */
.compare-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: clamp(18px, 2.4vw, 28px); }
.compare-form .pill { min-height: 50px; padding: 0 30px; }
.lanes { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.lane { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "tag track" ". label"; column-gap: 12px; row-gap: 6px; align-items: center; }
.lane-tag { grid-area: tag; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 800; font-size: .9rem; }
.track { --p: 0; grid-area: track; position: relative; height: 76px; border-radius: 12px; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 40px, transparent 40px 80px), #0e1014; border: 1px solid var(--line); }
.lane-bar { position: absolute; top: 50%; inset-inline-start: 0; height: 6px; margin-top: -3px; width: calc(var(--p) * 100%); border-radius: 0 6px 6px 0; background: linear-gradient(90deg, rgba(90, 169, 255, .2), var(--accent)); }
html[dir="rtl"] .lane-bar { border-radius: 6px 0 0 6px; background: linear-gradient(-90deg, rgba(90, 169, 255, .2), var(--accent)); }
.lane.is-neutral .lane-bar { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .22) 0 6px, rgba(255, 255, 255, .08) 6px 12px); }
.lane-car { position: absolute; top: 8px; bottom: 8px; width: 80px; aspect-ratio: auto; border-radius: 8px; inset-inline-start: calc(8px + var(--p) * (100% - 96px - 14px)); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); border: 1px solid var(--line-2); }
.lane-car .ph-name { font-size: .62rem; line-height: 1.15; }
.lane-finish { position: absolute; top: 0; bottom: 0; inset-inline-end: 14px; border-inline-start: 2px dashed rgba(255, 255, 255, .35); }
.lane-label { grid-area: label; min-height: 1.2em; font-size: .86rem; font-weight: 700; color: var(--muted); }
.lane.is-neutral .lane-label { color: var(--dim); }
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.result { padding: clamp(18px, 2.4vw, 26px); }
.result h3 { font-size: 1.3rem; margin-bottom: 12px; }
.result dl { margin: 0; }
.result dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.result dt { color: var(--dim); }
.result dd { margin: 0; font-weight: 700; text-align: end; }

/* ---------- cost ---------- */
.cost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.cost-controls { display: flex; flex-direction: column; gap: 26px; padding: clamp(22px, 3vw, 36px); }
.days-head { display: flex; justify-content: space-between; align-items: baseline; }
.days-head output { font-size: 1.4rem; font-weight: 800; }
input[type="range"] { --fill: 7%; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill), rgba(255, 255, 255, .12) var(--fill)); }
html[dir="rtl"] input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(-90deg, var(--accent) var(--fill), rgba(255, 255, 255, .12) var(--fill)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--muted); font-size: .86rem; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
@media (hover: hover) { .chip:hover { border-color: var(--accent); color: #fff; } }
.chip[aria-pressed="true"] { background: rgba(90, 169, 255, .16); border-color: var(--accent); color: #fff; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 700; }
.switch { position: relative; width: 60px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; flex: none; }
.switch::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 30px; border-radius: 999px; background: rgba(255, 255, 255, .14); transition: background .25s; }
.switch i { position: absolute; top: 10px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch[aria-checked="true"]::before { background: var(--accent); }
.switch[aria-checked="true"] i { transform: translateX(30px); }
html[dir="rtl"] .switch[aria-checked="true"] i { transform: translateX(-30px); }
.cost-card { display: flex; flex-direction: column; padding: clamp(22px, 3vw, 36px); background: radial-gradient(90% 80% at 80% 0%, rgba(90, 169, 255, .12), transparent 60%), var(--panel); }
.total { margin: 6px 0 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.total b { font-size: clamp(3rem, 7vw, 5.2rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.total span { font-size: 1.3rem; font-weight: 800; color: var(--muted); }
.total.is-text b { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.03em; }
html[lang="ar"] .total b { letter-spacing: 0; }
.total-for { margin: 12px 0 0; color: var(--muted); font-weight: 600; }
.total-driver { margin: 6px 0 0; color: var(--accent); font-weight: 700; font-size: .92rem; }
.cost-card .note { margin: 18px 0 22px; }
.cost-card .pill--wide { margin-top: auto; }

/* ---------- garage ---------- */
.garage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); margin: 0; padding: 0; list-style: none; }
.g-card { display: block; height: 100%; padding: 10px 10px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease); }
@media (hover: hover) { .g-card:hover { border-color: rgba(90, 169, 255, .5); transform: translateY(-3px); } }
.g-card .ph img { transition: transform .6s var(--ease); }
@media (hover: hover) { .g-card:hover .ph img { transform: scale(1.04); } }
.g-card h3 { margin: 16px 8px 4px; font-size: 1.12rem; letter-spacing: -.02em; }
.g-card p { margin: 0 8px; font-size: .88rem; color: var(--muted); font-weight: 600; }

/* =============================== FOOTER =============================== */
.foot { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--line); }
.foot-inner { max-width: 1240px; margin: 0 auto; padding: 48px calc(var(--pad) + env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) calc(var(--pad) + env(safe-area-inset-left)); display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: start; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand .crown { width: 34px; height: 34px; }
.foot-en { margin: 0; font-weight: 800; font-size: 1.1rem; }
.foot-ar { margin: 2px 0 0; font-family: var(--arabic); font-weight: 700; color: var(--muted); }
.foot-list { display: flex; flex-wrap: wrap; gap: 0 26px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.foot-list li { display: flex; align-items: center; min-height: 44px; }
.foot-list a { display: inline-flex; align-items: center; min-height: 44px; }
@media (hover: hover) { .foot-list a:hover, .foot-small a:hover, .foot-top:hover { color: var(--accent); } }
.foot-services { grid-column: 1 / -1; margin: 0; color: var(--dim); font-size: .86rem; }
.foot-small { margin: 0; font-size: .8rem; color: var(--dim); }
.foot-small a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-top { justify-self: end; display: inline-flex; align-items: center; min-height: 44px; font-size: .82rem; font-weight: 700; color: var(--muted); }

/* =============================== RESPONSIVE =============================== */
@media (max-width: 1024px) {
  .garage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .bar-link { display: none; }
  .finder-grid, .cost-grid { grid-template-columns: minmax(0, 1fr); }
  .dial-panel { max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  :root { --bar-h: 58px; }
  .pill--bar { padding: 0 16px; }
  .pill--bar .long { display: none; }
  .pill--bar .short { display: inline; }
  .wm-en { font-size: .8rem; letter-spacing: .06em; }
  .brand { gap: 8px; }
  .bar-nav { gap: 8px; }
  .lang { padding: 2px; }
  .lang button { min-width: 44px; padding: 0 8px; }
  .crown { width: 22px; height: 22px; }
  .headline { font-size: clamp(2.5rem, 12.4vw, 4rem); }
  html[lang="ar"] .headline { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  .caption--card, .caption--mini { inset-inline-start: calc(16px + env(safe-area-inset-left)); inset-inline-end: calc(16px + env(safe-area-inset-right)); width: auto; bottom: calc(env(safe-area-inset-bottom) + 22px); }
  html[dir="rtl"] .caption--card, html[dir="rtl"] .caption--mini { inset-inline-start: calc(16px + env(safe-area-inset-right)); inset-inline-end: calc(16px + env(safe-area-inset-left)); }
  .spec { padding: 18px; }
  .spec h3 { font-size: 1.35rem; }
  .stats { margin: 14px 0; padding-top: 12px; }
  .stats b { font-size: 1rem; }
  .spec .pill--sm { width: 100%; }
  .progress { height: 70px; margin-top: -35px; }
  .compare-form { grid-template-columns: minmax(0, 1fr); }
  .results { grid-template-columns: minmax(0, 1fr); }
  .track { height: 64px; }
  .lane-car { width: 64px; inset-inline-start: calc(8px + var(--p) * (100% - 80px - 14px)); }
  /* garage: horizontal snap scroll on phones */
  .garage-grid { display: flex; gap: 12px; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .garage-grid::-webkit-scrollbar { display: none; }
  .garage-grid li { flex: 0 0 74%; scroll-snap-align: start; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  .foot-top { justify-self: start; }
}
@media (max-width: 360px) {
  .lang button { min-width: 44px; padding: 0 6px; }
  .wordmark small { display: none; }
}
html[lang="ar"] .hint, html[lang="ar"] .pill, html[lang="ar"] .stats b, html[lang="ar"] .mini p, html[lang="ar"] .combo-value, html[lang="ar"] .g-card h3, html[lang="ar"] .spec-note { letter-spacing: 0; }
@media (max-height: 500px) {
  .dial-panel { max-width: min(520px, 80vh); margin: 0 auto; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .headline { font-size: clamp(1.9rem, 11vh, 3rem); }
  html[lang="ar"] .headline { font-size: clamp(2rem, 11.5vh, 3.1rem); }
  .sub { margin-top: 8px; font-size: .9rem; }
  .hint { display: none; }
  .caption { bottom: calc(env(safe-area-inset-bottom) + 14px); }
  .spec { padding: 14px 16px; }
  .spec h3 { font-size: 1.25rem; }
  .spec-line, .spec .spec-note { display: none; }
  .stats { margin: 10px 0; padding-top: 10px; }
  .caption--card, .caption--mini { width: min(320px, 46vw); }
  .mini { padding: 14px 16px; }
  .mini p { font-size: 1rem; margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hint::before, .loader i::after { animation: none; }
  .g-card, .g-card .ph img, .pill, .dial { transition: none; }
}
