:root {
  --green: #0f1115; --green-2: #2a2f3a; --gold: #ff5a36; --sand: #f3f4f6; --ink: #14161b; --muted: #636a78;
  --line: #e2e5ea; --white: #fff; --hot: #e4572e; --warm: #f4a259; --cold: #6c8ea4; --ok: #1f9d6b;
  --r: 16px; --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --serif: var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--sand); line-height: 1.5; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 22px; font: 700 15px var(--font); background: var(--green); color: #fff; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { background: var(--green-2); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.wide { width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* demo bar */
.demo-bar { background: #0b1024; color: #e8eaff; font-size: 13.5px; }
.demo-bar .row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 9px 0; }
.pill { display: inline-block; margin-inline-end: 8px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #4f5dff, #ff7a59); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .5px; }
.demo-links { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-links a { padding: 6px 12px; border-radius: 999px; background: #4f5dff; color: #fff; font-weight: 700; text-decoration: none; }
.demo-links a.ghost { background: rgba(255,255,255,.12); }

/* hero */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--green); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; opacity: .7; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,17,21,.96) 0%, rgba(15,17,21,.75) 55%, rgba(15,17,21,.3) 100%); }
.hero-in { position: relative; z-index: 1; padding: 28px 0 54px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.brand-mark svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand b { display: block; font-size: 20px; letter-spacing: 3px; line-height: 1; font-weight: 900; }
.brand small { letter-spacing: 4px; font-size: 10.5px; color: var(--gold); font-weight: 700; }
.hero h1 { font-weight: 900; letter-spacing: -1.5px; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; margin: 56px 0 14px; max-width: 720px; }
.hero h1 span { color: var(--gold); }
.hero p { max-width: 540px; font-size: 18px; color: #d6d9e0; margin: 0 0 28px; }
.search { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; background: #fff; color: var(--ink); padding: 14px; border-radius: 18px; max-width: 860px; box-shadow: 0 30px 60px -25px rgba(0,0,0,.5); }
.seg { display: flex; background: var(--sand); border-radius: 12px; padding: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--green); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); }
.fld { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fld input, .fld select, .fld textarea { width: 100%; font: 500 15px var(--font); color: var(--ink); padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fld textarea { resize: vertical; }

/* listings */
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin: 44px 0 18px; }
.list-head h2 { font-family: var(--serif); font-size: 30px; margin: 0; }
.list-head p { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { all: unset; box-sizing: border-box; cursor: pointer; background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(20,48,43,.45); }
.card:focus-visible { outline: 3px solid var(--gold); }
.card figure { margin: 0; position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover img { transform: scale(1.05); }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--gold); color: #fff; }

.card-b { padding: 16px 18px 18px; display: grid; gap: 4px; }
.price { font-weight: 900; font-size: 21px; margin: 0; color: var(--ink); }
.price small { font-weight: 600; font-size: 13px; color: var(--muted); }
.card h3 { margin: 0; font-size: 16.5px; }
.meta { margin: 0; color: var(--muted); font-size: 14px; }
.cta { margin-top: 8px; font-weight: 700; font-size: 14px; color: var(--gold); }
.empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--muted); }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 56px 0; }
.perks div { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.perks b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--sand); font-size: 20px; }
.perks h3 { margin: 12px 0 4px; font-size: 17px; }
.perks p { margin: 0; color: var(--muted); font-size: 14.5px; }
.foot { background: var(--green); color: #c4c8d2; font-size: 14px; padding: 26px 0; }
.foot a { color: var(--gold); }

/* modal */
dialog { width: min(980px, 100% - 24px); max-height: calc(100% - 24px); border: 0; border-radius: 22px; padding: 0; overflow: auto; box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(10,20,18,.6); backdrop-filter: blur(3px); }
.x { position: sticky; top: 10px; float: right; margin: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.m-grid { display: grid; grid-template-columns: 1.1fr 1fr; }
.m-photo { margin: 0; position: relative; min-height: 300px; }
.m-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-body { padding: 26px 28px; }
.m-sub { margin: 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.m-body h2 { font-family: var(--serif); font-size: 28px; line-height: 1.15; margin: 4px 0 6px; }
.m-price { font-size: 24px; font-weight: 800; color: var(--green); margin: 0 0 12px; }
.facts { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 600; font-size: 14.5px; }
.m-text { color: #3d4643; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 4px 10px; border-radius: 999px; background: var(--sand); font-size: 12.5px; font-weight: 700; color: var(--green-2); }
.enquiry, .done { border-top: 1px solid var(--line); padding: 22px 28px 28px; display: grid; gap: 14px; background: #fcfbf8; }
.tabs { display: flex; gap: 8px; }
.tabs button { flex: 1; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: 700 15px var(--font); cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.lbl { margin: 0 0 8px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day { flex: none; min-width: 84px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 600 14px var(--font); display: grid; }
.day small { color: var(--muted); font-weight: 600; }
.day.on { border-color: var(--gold); background: #fff1ec; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.slot { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: 700 14px var(--font); cursor: pointer; }
.slot.on { background: var(--gold); color: #fff; border-color: var(--gold); }
.slot:disabled { text-decoration: line-through; opacity: .4; cursor: not-allowed; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.err { margin: 0; color: var(--hot); font-weight: 700; min-height: 1em; }
.err:empty { display: none; }

/* done state */
.done { grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.done[hidden], .enquiry[hidden] { display: none; }
.phone { border-radius: 20px; overflow: hidden; background: #ece5dd; border: 1px solid var(--line); }
.wa-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #075e54; color: #fff; }
.wa-head small { display: block; font-size: 12px; opacity: .8; }
.wa-av { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.wa-body { padding: 14px; display: grid; gap: 8px; min-height: 190px; align-content: start; }
.wa-msg { max-width: 86%; padding: 8px 11px; border-radius: 10px; font-size: 14.5px; box-shadow: 0 1px 1px rgba(0,0,0,.08); animation: pop .3s ease; }
.wa-msg.out { justify-self: end; background: #dcf8c6; }
.wa-msg.in { justify-self: start; background: #fff; }
.wa-typing { justify-self: start; background: #fff; padding: 10px 12px; border-radius: 10px; display: flex; gap: 4px; }
.wa-typing[hidden] { display: none; }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa; animation: blink 1s infinite; }
.wa-typing i:nth-child(2) { animation-delay: .15s; } .wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.agent-view { display: grid; gap: 12px; }
.score { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.score b { font-size: 34px; line-height: 1; }
.score small { color: var(--muted); font-weight: 700; }
.tier { padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #fff; background: var(--cold); }
.tier.hot { background: var(--hot); } .tier.warm { background: var(--warm); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-inline-start: 28px; font-weight: 600; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 12px; }
.checks li[hidden] { display: none; }
.link { background: none; border: 0; color: var(--muted); font: 600 14px var(--font); text-decoration: underline; cursor: pointer; }

@media (max-width: 860px) {
  .search { grid-template-columns: 1fr 1fr; }
  .seg { grid-column: 1 / -1; }
  .seg label { flex: 1; text-align: center; }
  .search .btn { grid-column: 1 / -1; }
  .m-grid, .done, .perks { grid-template-columns: 1fr; }
  .m-photo { aspect-ratio: 4 / 3; min-height: 0; }
}
@media (max-width: 560px) {
  .two, .three { grid-template-columns: 1fr; }
  .m-body, .enquiry, .done { padding-inline: 18px; }
  .hero h1 { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* car extras */
.m-photo { background: #0f1115; }
.calc { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--sand); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; align-items: end; }
.pay { text-align: end; }
.pay b { display: block; font-size: 26px; line-height: 1.1; color: var(--gold); }
.pay small, .fine { color: var(--muted); font-size: 12px; }
.fine { display: block; margin-top: 6px; }
.trade { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.trade summary { cursor: pointer; font-weight: 700; }
.trade summary small { color: var(--muted); font-weight: 600; }
.trade .three { margin-top: 12px; }
.trade-out { margin: 10px 0 0; font-weight: 700; color: var(--ok); }
.trade-out:empty { display: none; }
@media (max-width: 560px) { .calc-row { grid-template-columns: 1fr 1fr; } .pay { grid-column: 1 / -1; text-align: start; } }
