/* Haulbahn portal — matches haulbahn.com: Geist, black on white, hairline greys. */
:root {
  --ink: #0A0A0A;
  --muted: #52525B;
  --subtle: #71717A;
  --faint: #A1A1AA;
  --line: #EDEDEF;
  --field: #D4D4D8;
  --bg: #FFFFFF;
  --soft: #FAFAFA;
  --ok: #15803D;
  --err: #B91C1C;
  --err-bg: #FEF2F2;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-feature-settings: "tnum"; }

/* frame lines like the website */
.frame { position: relative; flex: 1; display: flex; flex-direction: column; }
.frame::before, .frame::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); pointer-events: none; }
.frame::before { left: 48px; }
.frame::after { right: 48px; }

/* header */
.top { height: 72px; flex-shrink: 0; padding: 0 96px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 1; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand span { font-size: 20px; font-weight: 600; letter-spacing: -0.035em; }
.top-right { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.langs { display: flex; gap: 10px; font-size: 12px; }
.langs a { color: var(--faint); }
.langs a.on { color: var(--ink); }
.top-link { color: var(--muted); }

/* auth split */
.split { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); position: relative; z-index: 1; }
.pane { padding: 72px 96px 56px; display: flex; flex-direction: column; justify-content: center; }
.form-wrap { width: 100%; max-width: 420px; }
.side { border-left: 1px solid var(--line); padding: 40px 72px 40px 40px; display: flex; flex-direction: column; justify-content: center; gap: 28px; overflow: hidden; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
h1 { font-size: 44px; line-height: 1.02; letter-spacing: -0.045em; font-weight: 500; margin: 18px 0 14px; }
.lead { font-size: 17px; line-height: 1.55; color: var(--muted); margin: 0 0 32px; }

/* form */
form { display: flex; flex-direction: column; gap: 18px; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); padding-top: 6px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; }
.section-label:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label-row { font-size: 14px; font-weight: 500; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: 13px; font-weight: 400; color: var(--muted); }
.label-row a:hover { color: var(--ink); }
.hint { font-size: 12px; color: var(--subtle); }
input[type=text], input[type=email], input[type=password], input[type=tel] {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  height: 46px; padding: 0 14px; border: 1px solid var(--field); border-radius: 8px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10,10,10,.08); }
.pw { position: relative; }
.pw input { padding-right: 72px; }
.pw button { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.pw button:hover { color: var(--ink); background: var(--soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--muted); }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; width: 100%; transition: opacity .15s; }
.btn:hover { opacity: .88; color: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: var(--bg); color: var(--ink); border-color: var(--field); width: auto; height: 42px; font-size: 15px; padding: 0 18px; }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.alt { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.alt a { color: var(--ink); font-weight: 500; }
.alt a:hover { color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.notice.err { background: var(--err-bg); color: var(--err); border: 1px solid #FECACA; }
.notice.ok { background: #F0FDF4; color: var(--ok); border: 1px solid #BBF7D0; }
.notice.info { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }

/* side panel */
.side-title { font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; max-width: 460px; margin: 0; }
.map-box { position: relative; width: 100%; max-width: min(620px, calc((100vh - 400px) * 1.107)); min-width: 280px; aspect-ratio: 620 / 560; }
.map-scale { position: absolute; left: 0; top: 0; width: 620px; height: 560px; transform-origin: 0 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 18px 18px 0 0; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat b { font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 400; font-size: 24px; letter-spacing: -0.03em; }
.stat span { font-size: 13px; line-height: 1.45; color: var(--subtle); }

/* map animation (from homepage) */
.flow { stroke-dasharray: 3 7; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.truck { position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(10,10,10,.12); offset-rotate: 0deg; animation: move 10s linear infinite; }
@keyframes move { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.pulse { position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--ink); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .flow, .truck, .pulse { animation: none; } }

/* footer */
.foot { padding: 22px 96px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 13px; color: var(--subtle); position: relative; z-index: 1; background: var(--bg); }

/* dashboard */
.dash { flex: 1; padding: 64px 96px; position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-content: start; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.card h2 { font-size: 22px; letter-spacing: -0.03em; font-weight: 500; margin: 14px 0 10px; }
.card p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #D97706; }
.badge.active .dot { background: var(--ok); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 14px 16px; font-size: 15px; margin: 18px 0 0; }
.kv dt { color: var(--subtle); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.inline-form { display: inline; }

/* responsive */
@media (max-width: 1100px) {
  .pane, .top, .foot, .dash { padding-left: 56px; padding-right: 56px; }
  .frame::before { left: 24px; } .frame::after { right: 24px; }
}
@media (max-width: 920px) {
  .split, .dash { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .pane { padding-top: 48px; justify-content: flex-start; }
  .form-wrap { margin: 0 auto; }
}
@media (max-width: 560px) {
  .frame::before, .frame::after { display: none; }
  .top { padding: 0 16px; height: 64px; }
  .top-link { display: none; }
  .pane, .dash { padding: 36px 16px 40px; }
  .foot { padding: 18px 16px; flex-direction: column; gap: 6px; }
  h1 { font-size: 34px; }
  .row2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv dd { margin-bottom: 10px; }
}

/* ---------- portal app ---------- */
.tabs { display: flex; gap: 4px; padding: 0 96px; border-bottom: 1px solid var(--line); position: relative; z-index: 1; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 14px 14px 13px; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.subtabs { display: flex; gap: 20px; margin: 4px 0 28px; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 10px 0; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; }
.subtabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.count { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; text-align: center; }

.page { flex: 1; padding: 56px 96px 72px; position: relative; z-index: 1; width: 100%; }
.page.narrow { max-width: 880px; }
.h1-sm { font-size: 34px; letter-spacing: -0.04em; margin: 14px 0 12px; }
.h2 { font-size: 24px; letter-spacing: -0.03em; font-weight: 500; margin: 0; }
.eyebrow a { color: var(--muted); }
.eyebrow a:hover { color: var(--ink); }

.btn.auto { width: auto; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.danger { color: var(--err); border-color: #FECACA; }
.btn.danger:hover { color: var(--err); border-color: var(--err); }
.card.cta { background: var(--soft); }

.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 20px; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; font-size: 15px; }
.row-link + .row-link { border-top: 1px solid var(--line); }
.row-link:hover { background: var(--soft); color: var(--ink); }
.row-main { min-width: 0; }
.row-meta { font-size: 12px; color: var(--subtle); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: #BBF7D0; background: #F0FDF4; }
.badge.warn { color: #B45309; border-color: #FDE68A; background: #FFFBEB; }
.badge.muted .dot { background: var(--faint); }
.badge { white-space: nowrap; }

/* form controls */
select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  padding: 0 14px; border: 1px solid var(--field); border-radius: 8px; width: 100%;
}
select { height: 46px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; }
select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10,10,10,.08); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 9px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--field); border-radius: 999px; font-size: 14px; color: var(--muted); transition: all .15s; user-select: none; }
.chip:hover span { border-color: var(--ink); color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(10,10,10,.15); }
.req-form, .option-form { gap: 20px; }
.inline-row { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.inline-row select { height: 34px; width: auto; font-size: 14px; background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px; }

/* options */
.options-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 32px 0 18px; }
.options { display: flex; flex-direction: column; gap: 24px; }
.option { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.option-media { position: relative; border-right: 1px solid var(--line); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; background: var(--soft); }
.gallery img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; scroll-snap-align: start; display: block; }
.option-media { display: flex; flex-direction: column; }
.media-wrap { position: sticky; top: 0; }
.gallery.empty { align-items: center; justify-content: center; color: var(--faint); font-size: 14px; aspect-ratio: 4 / 3; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgba(10,10,10,.72); color: #fff; font-size: 11px; padding: 5px 9px; border-radius: 999px; pointer-events: none; }
.option-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.option-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.option-num { font-size: 13px; color: var(--subtle); margin-right: 4px; }
.option h2 { font-size: 26px; letter-spacing: -0.035em; font-weight: 500; margin: 0; }
.option-sub { margin: -6px 0 0; font-size: 13px; color: var(--subtle); }
.option-hl { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 4px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs div { display: flex; flex-direction: column; gap: 2px; }
.specs dt { font-size: 12px; color: var(--subtle); }
.specs dd { margin: 0; font-size: 14px; }
.costs { display: flex; flex-direction: column; gap: 8px; }
.costs .eyebrow { margin-bottom: 4px; }
.cost-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.cost-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--ink); font-size: 15px; font-weight: 500; }
.cost-total .mono { font-size: 24px; letter-spacing: -0.03em; }
.saving { margin: 0; font-size: 14px; color: var(--ok); }
.searching { display: flex; flex-direction: column; align-items: flex-start; margin-top: 28px; background: var(--soft); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(21,128,61,.5); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px rgba(21,128,61,0); } }

/* admin */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--subtle); font-size: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: underline; text-underline-offset: 2px; }
.table .btn { text-decoration: none; }
.cost-preview { height: 46px; display: flex; align-items: center; padding: 0 14px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); font-size: 13px; }
.copy-field { font-size: 12px !important; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.thumb img { width: 120px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
input[type=file] { font: inherit; font-size: 14px; }
.admin-grid .kv { grid-template-columns: 96px 1fr; font-size: 14px; }

@media (max-width: 1100px) {
  .tabs, .page { padding-left: 56px; padding-right: 56px; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 920px) {
  .option { grid-template-columns: minmax(0, 1fr); }
  .option-media { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .tabs { padding: 0 8px; }
  .page { padding: 32px 16px 48px; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .option-body { padding: 20px 18px; }
  .row-link { flex-direction: column; align-items: flex-start; gap: 8px; }
  .top .inline-form .btn { height: 36px; padding: 0 12px; font-size: 14px; }
  .top-right .top-link { display: none; }
}

/* ---------- market analysis ---------- */
.option-analysis { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.option-analysis:empty { display: none; }
.analysis > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 28px; }
.analysis > summary::-webkit-details-marker { display: none; }
.analysis > summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); line-height: 1; }
.analysis[open] > summary::after { content: "–"; }
.analysis > summary:hover { background: var(--soft); }
.analysis > :not(summary) { margin-left: 28px; margin-right: 28px; }
.analysis > :last-child { margin-bottom: 28px; }
.verdict { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.v-great { background: #DCFCE7; color: #166534; }
.v-good { background: #ECFCCB; color: #3F6212; }
.v-fair { background: #FEF9C3; color: #854D0E; }
.v-high { background: #FEE2E2; color: #991B1B; }
.ma-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 4px; }
.ma-gauge { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.ma-big { font-size: 26px; letter-spacing: -0.03em; font-weight: 500; }
.gauge { width: 100%; max-width: 300px; margin: 6px 0 4px; }
.g-lbl { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; fill: var(--muted); text-anchor: middle; }
.ma-stats { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.ma-stats div { display: flex; flex-direction: column; gap: 4px; }
.ma-stats .wide { grid-column: 1 / -1; }
.ma-stats dt { font-size: 12px; color: var(--subtle); }
.ma-stats dd { margin: 0; font-size: 18px; }
.ma-stats .wide dd { font-size: 13px; }
.chart { margin: 20px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.s-grid { stroke: var(--line); stroke-width: 1; }
.s-tick { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; fill: var(--subtle); }
.s-trend { stroke: #F97316; stroke-width: 2; }
.s-local { fill: #A1A1AA; fill-opacity: .55; }
.s-de { fill: none; stroke: #71717A; stroke-width: 1.5; }
.s-me { fill: var(--ok); stroke: #fff; stroke-width: 3; }
.s-cross { stroke: var(--ok); stroke-width: 1; stroke-dasharray: 3 4; }
.chart figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -8px; vertical-align: middle; }
.lg-local { background: #A1A1AA; }
.lg-de { border: 1.5px solid #71717A; }
.lg-me { background: var(--ok); }
.lg-trend { width: 14px; height: 2px; border-radius: 0; background: #F97316; }
.comp-table { margin-top: 16px; max-height: 420px; overflow: auto; }
.comp-table .table { min-width: 560px; }
.comp-table td { vertical-align: middle; }
.mkt { display: inline-block; font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.comps-input { font-size: 13px !important; }

/* ---------- booking ---------- */
.book { display: flex; flex-direction: column; gap: 22px; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.book-car { display: flex; gap: 16px; align-items: center; }
.book-car img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cost-line.annual { padding: 14px 16px; border-radius: 10px; background: var(--soft); align-items: center; gap: 16px; }
.invite-form { max-width: 620px; }
.invite-form input { flex: 1; height: 38px; }

@media (max-width: 920px) {
  .ma-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .analysis > summary { padding: 16px 18px; }
  .analysis > :not(summary) { margin-left: 18px; margin-right: 18px; }
  .book { padding: 20px 16px; }
  .invite-form { flex-direction: column; align-items: stretch; }
}

/* ---------- back office ---------- */
.bo-tag { font-size: 11px; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--ink); color: #fff; margin-left: 4px; }
.bo-auth { max-width: 520px; }
.steps { margin: 0 0 24px; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.steps b { color: var(--ink); font-weight: 500; }
.qr { margin: 12px 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: block; width: fit-content; background: #fff; }
.qr svg { display: block; width: 200px; height: 200px; }
.code-input { font-size: 24px !important; letter-spacing: 0.3em; text-align: center; height: 56px !important; }

/* ---------- guided questionnaire ---------- */
.wizard { gap: 0; }
.wizard .step { display: flex; flex-direction: column; gap: 20px; padding: 8px 0 28px; }
.wizard .step[hidden] { display: none; }
.wizard:not(.wz-on) .step { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.step-head { display: flex; align-items: baseline; gap: 12px; }
.step-num { font-size: 13px; color: var(--subtle); }
.step-lead { margin: -10px 0 0; font-size: 15px; }
.wz-progress { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 24px; scroll-margin-top: 16px; }
.wz-label { font-size: 12px; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.06em; }
.wz-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.wz-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s ease; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 20px; }
.wz-nav .btn.ghost { height: 50px; }
.big-input { font-size: 24px !important; height: 60px !important; letter-spacing: -0.01em; }
.review { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--soft); }
.review-title { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.review-list { grid-template-columns: 170px 1fr; font-size: 14px; }
.review-list dd { display: flex; justify-content: space-between; gap: 12px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.link-btn:hover { color: var(--ink); }

/* ---------- brand helper ---------- */
.bp-root { display: flex; flex-direction: column; gap: 18px; }
.bp-label { font-size: 14px; }
.bp-suggest { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: #F0FDF4; border: 1px solid #BBF7D0; }
.chip-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 14px; border: 1px solid #86EFAC; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; }
.chip-btn small { font-size: 12px; font-weight: 400; color: var(--ok); }
.chip-btn:hover { border-color: var(--ok); }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bp-brand { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; border: 1px solid var(--field); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.bp-brand:hover { border-color: var(--ink); }
.bp-brand.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bp-brand b { font-size: 15px; font-weight: 500; }
.bp-badge { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; display: grid; place-items: center; }
.bp-fit { font-size: 12px; color: var(--faint); }
.bp-fit.ok { color: var(--ok); }
.bp-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.bp-ranked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bp-item { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bp-item-head { display: flex; align-items: center; gap: 12px; }
.bp-rank { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.bp-item-title { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bp-item-title b { font-size: 16px; font-weight: 500; }
.bp-actions { display: flex; gap: 4px; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 16px; color: var(--muted); cursor: pointer; }
.icon-btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.model-card { position: relative; display: flex; cursor: pointer; }
.model-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mc-body { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 11px 12px; border: 1px solid var(--field); border-radius: 10px; transition: border-color .15s, background .15s; }
.model-card:hover .mc-body { border-color: var(--ink); }
.model-card input:checked + .mc-body { border-color: var(--ink); background: var(--soft); box-shadow: inset 0 0 0 1px var(--ink); }
.model-card input:focus-visible + .mc-body { box-shadow: 0 0 0 3px rgba(10,10,10,.15); }
.model-card.dim .mc-body { opacity: .55; }
.mc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-top b { font-size: 14px; font-weight: 500; }
.mc-top .badge { font-size: 11px; padding: 2px 8px; }
.mc-prices { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--muted); }
.mc-ee { color: var(--faint); }
.mc-tags { font-size: 12px; color: var(--subtle); }
@media (max-width: 560px) {
  .bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .mc-body { padding: 9px 10px; gap: 3px; }
  .mc-sil svg { max-width: 84px; }
  .mc-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .mc-top b { font-size: 13px; }
  .mc-prices { font-size: 11px; }
  .mc-tags { font-size: 11px; }
  .bp-item { padding: 12px; }
  .bp-item-head { flex-wrap: wrap; }
  .bp-item-title .hint { font-size: 12px; }
  .review-list { grid-template-columns: 1fr; }
  .wz-nav .btn { flex: 1; }
}
.bp-all > summary { cursor: pointer; font-size: 14px; list-style: none; padding: 4px 0; }
.bp-all > summary::-webkit-details-marker { display: none; }
.bp-all > summary::before { content: "+ "; color: var(--muted); }
.bp-all[open] > summary::before { content: "– "; }
.bp-all > .bp-grid { margin-top: 12px; }
.bp-item > .link-btn { align-self: flex-start; }
.mc-sil { display: block; color: var(--ink); margin: 2px 0 4px; }
.mc-sil svg { display: block; width: 100%; max-width: 120px; height: auto; }
.mc-sil .b { fill: #27272A; }
.mc-sil .g { fill: #fff; opacity: .9; }
.mc-sil .w { fill: #27272A; stroke: #fff; stroke-width: 2.5; }
.mc-sil .h { fill: #A1A1AA; }
.model-card.dim .mc-sil .b, .model-card.dim .mc-sil .w { fill: #A1A1AA; }
.model-card input:checked + .mc-body .mc-sil .b, .model-card input:checked + .mc-body .mc-sil .w { fill: #0A0A0A; }
.bp-tile { width: 34px; height: 34px; border-radius: 9px; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.bp-brand.on .bp-tile { background: var(--ink); color: #fff; border-color: var(--ink); }
.bp-tile.sm { width: 30px; height: 30px; margin: 0; font-size: 13px; }
.bp-tile.logo { background: #fff; padding: 4px; }
.bp-tile.logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.bp-brand.on .bp-tile.logo { background: #fff; border-color: var(--ink); }
.brand-admin { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ba-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 96px; gap: 16px; align-items: center; padding: 12px 16px; }
.ba-row + .ba-row { border-top: 1px solid var(--line); }
.ba-logo { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.ba-logo img { max-width: 40px; max-height: 40px; object-fit: contain; }
.ba-logo .bp-tile { margin: 0; border: 0; }
.ba-name { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 720px) { .ba-row { grid-template-columns: 48px minmax(0, 1fr); } .ba-row form { grid-column: 1 / -1; } }
.draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: #FFFBEB; border: 1px solid #FDE68A; }
.draft-bar > div { display: flex; flex-direction: column; gap: 4px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
@media (max-width: 720px) { .draft-bar { flex-direction: column; align-items: stretch; } }
.draft-bar .btn { white-space: nowrap; height: 44px; padding: 0 18px; font-size: 15px; }
.draft-bar > form { flex-shrink: 0; }

/* Estimated cost lines */
.cost-line .approx { color: var(--muted, #8a8a8a); font-size: .85em; cursor: help; }

/* Photo drop zone (back office) */
.dropzone { position: relative; border: 1.5px dashed #c9c9cf; border-radius: 12px; padding: 22px 16px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.over { border-color: #111; background: #fafafa; outline: none; }
.dropzone b { color: #111; }
.dropzone .link { text-decoration: underline; color: #111; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.dropzone.has-files .drop-thumbs { margin-top: 14px; }
.drop-thumbs figure { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #eee; }
.drop-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drop-thumbs button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 22px; padding: 0; cursor: pointer; }

/* Fill option form from a pasted listing */
.fill-listing { border: 1px solid #e4e4e7; border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; background: #fafafa; }
.fill-listing summary { cursor: pointer; }
.fill-listing[open] summary { margin-bottom: 12px; }
.fill-listing .inline-row { display: flex; gap: 8px; }
.fill-listing .inline-row input { flex: 1; min-width: 0; }
.option-form .filled { box-shadow: 0 0 0 2px #22c55e55; transition: box-shadow .3s; }

/* Auto-filled cost fields */
.auto-tag { display: inline-block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; vertical-align: 1px; font-weight: 500; }
.cost-auto-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.cost-auto-note [data-recalc-status] { color: var(--muted); }

/* Buyer car card: key tiles, feature badges, equipment, technical data */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; min-width: 0; }
.tile .ico { width: 20px; height: 20px; color: var(--muted); margin-bottom: 6px; }
.tile b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { font-size: 12px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.fbadge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px; background: #ecfdf3; color: #166534; font-size: 13px; border: 1px solid #d1fadf; }
.ico-sm { width: 14px; height: 14px; flex: none; }
.option-more { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 22px 28px 8px; }
.option-more:empty { display: none; }
.eq-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.eq-group { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.eq-group h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
.eq-ico { width: 18px; height: 18px; color: #111; padding: 5px; box-sizing: content-box; background: #f4f4f5; border-radius: 8px; }
.eq-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.eq-group li { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.eq-group li .ico-sm { color: #16a34a; margin-top: 2px; }
.tech { margin: 14px 0 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.tech summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
.tech summary::-webkit-details-marker { display: none; }
.tech summary::after { content: '+'; margin-left: auto; font-size: 18px; color: var(--muted); }
.tech[open] summary::after { content: '–'; }
.tech-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; margin: 12px 0 0; }
.tech-grid div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tech-grid dt { font-size: 13px; color: var(--subtle); }
.tech-grid dd { margin: 0; font-size: 13px; text-align: right; }
@media (max-width: 900px) { .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-more { padding: 18px 16px 6px; }
  .tech-grid { grid-template-columns: 1fr; }
}

/* Photo column: main photo + clickable thumbnails */
.media-main { position: relative; }
.thumb-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.thumb-btn { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--soft); aspect-ratio: 4 / 3; }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btn.on { border-color: #111; }
@media (max-width: 640px) { .thumb-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px; } }

/* Buyer: comparison with the Estonian market */
.cmp { margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.cmp-head, .cmp-cars-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.cmp-cars-head { margin-top: 18px; }
.cmp-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cmp-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--subtle); }
.cmp-table thead th { font-size: 12px; }
.cmp-table td { font-size: 14px; }
.cmp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.cmp-dot.good { background: #16a34a; } .cmp-dot.bad { background: #f59e0b; }
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.insights li { font-size: 14px; line-height: 1.4; padding: 10px 12px; border-radius: 10px; background: #fafafa; border: 1px solid var(--line); }
.insights li.good { background: #f0fdf4; border-color: #d1fadf; color: #14532d; }
.insights li.bad { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.delta { font-size: 12px; }
.delta.good { color: #15803d; } .delta.bad { color: #b45309; }
.comp-table tr.ref { opacity: .7; }
@media (max-width: 760px) { .cmp-grid { grid-template-columns: 1fr; } }

/* Back office: comparables tools */
.comps-tools .hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.comps-paste { margin: 8px 0 12px; border: 1px dashed #d4d4d8; border-radius: 10px; padding: 10px 12px; }
.comps-paste summary { cursor: pointer; font-size: 14px; }
.comps-paste textarea { width: 100%; margin-top: 8px; }

/* Back office: research panel */
.research { margin-top: 32px; }
.research-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.rchip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #f4f4f5; font-size: 12px; margin: 4px 2px 0 0; color: #27272a; }
.maxprice { display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding: 10px 14px; border-radius: 12px; background: #ecfdf3; border: 1px solid #d1fadf; }
.maxprice b { font-size: 22px; color: #14532d; }
.searches { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.searches li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.links-table td { vertical-align: top; }
.links-table tr.weak { opacity: .55; }
.links-table tr.used { opacity: .45; }
.lflags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lflag { font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid; }
.lflag.ok { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.lflag.bad { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.lflag.ask { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.commission-form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 4px; }
.commission-form input { width: 110px; }
.commission-form select { width: auto; }
.req-table th { text-align: left; font-weight: 500; }
.req-table td, .req-table th { font-size: 13px; vertical-align: top; }
.req-table .ok { color: #15803d; font-weight: 600; }
.btn.dim { opacity: .5; }
.commission-form > input, .commission-form > select, .commission-form > .btn { width: auto !important; flex: 0 0 auto; margin: 0; }
.commission-form > input { width: 96px !important; }
.commission-form > .hint { flex: 1 1 100%; }
.search-brand { margin: 10px 0 14px; }
.search-table th { text-align: left; font-weight: 500; width: 26%; font-size: 13px; vertical-align: top; }
.search-table td { vertical-align: top; }
.search-table tr.weak { opacity: .55; }
.teach-form { display: flex; flex-direction: row; gap: 6px; margin-top: 6px; }
.teach-form input[name=url] { flex: 1 1 auto; min-width: 0; font-size: 12px; }
.teach-form .btn { width: auto; flex: 0 0 auto; }
.fit-all { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; padding: 14px 16px; border: 1px solid #d1fadf; background: #f0fdf4; border-radius: 12px; }
.fit-all > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; }
.fit-all input { width: 90px; }
.fit-all .btn { width: auto; }
.fit-all .inline-row { display: flex; align-items: center; gap: 6px; }

/* Buyer: time to sell & value */
.dyn { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 18px 0 4px; }
.dyn-tile { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.dyn-tile b { font-size: 20px; }
.avail-actions { display: flex; flex-direction: row; gap: 4px; margin-top: 4px; }
.avail-actions form { display: inline; }
.hint.stale { color: #b45309; }

/* ---------- Buyer: car list (compact cards) ---------- */
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.ccard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; background: #fff; transition: box-shadow .15s, transform .15s; }
.ccard:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-2px); }
.ccard-img { position: relative; aspect-ratio: 16 / 10; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 14px; }
.ccard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard-num { position: absolute; left: 12px; bottom: 12px; z-index: 1; background: rgba(255,255,255,.92); border-radius: 999px; padding: 3px 9px; font-size: 12px; }
.ccard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ccard h2 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.ccard .option-sub { margin: -4px 0 0; }
.ccard-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.ccard-foot > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ccard-foot .badge, .ccard-foot .verdict { align-self: flex-start; }
.ccard-total { font-size: 24px; letter-spacing: -0.02em; }
.ccard-verdict { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; gap: 8px !important; }
.ccard-more { font-size: 13px; font-weight: 600; color: #111; }

/* What the buyer asked for */
.wanted { border: 1px solid #d1fadf; background: #f6fef9; border-radius: 14px; padding: 14px 16px; margin: 6px 0 18px; }
.wanted ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; }
.wanted li { display: flex; align-items: baseline; gap: 7px; font-size: 14px; }
.wanted .w-sym { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; color: #fff; }
.wanted .w-ok .w-sym { background: #16a34a; } .wanted .w-no .w-sym { background: #dc2626; } .wanted .w-ask .w-sym { background: #f59e0b; } .wanted .w-na .w-sym { background: #a1a1aa; }
.wanted.compact { border: 0; background: none; padding: 0; margin: 0; }
.wanted.compact ul { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wanted.compact li { font-size: 12px; padding: 3px 9px 3px 4px; border-radius: 999px; background: #f0fdf4; border: 1px solid #d1fadf; color: #166534; }
.wanted.compact li b { font-weight: 500; }
.wanted.compact .w-sym { width: 15px; height: 15px; font-size: 9px; }

/* ---------- Buyer: full car page ---------- */
.car-page .option.detail { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.car-page .option.detail .option-media { position: relative; }
.car-page .option.detail .media-wrap { position: sticky; top: 12px; }
.car-page .option.detail .gallery img { aspect-ratio: 3 / 2; }
.car-page .thumb-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.option-desc { border-left: 3px solid #111; padding: 2px 0 2px 14px; }
.option-desc p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.gal-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gal-btn.prev { left: 12px; } .gal-btn.next { right: 12px; }
.snap { margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.snap-table th { text-align: left; font-weight: 500; }
.snap-table tr.me { background: #f0fdf4; }
.scan-all { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.scan-all .btn { width: auto; }
@media (max-width: 900px) { .car-page .option.detail { grid-template-columns: 1fr; } .car-page .option.detail .media-wrap { position: static; } }
@media (max-width: 640px) { .ccards { grid-template-columns: 1fr; } .car-page .thumb-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- Buyer pages v3: request overview, car list, car page, market analysis ----------
   Ink on paper, Geist only, tabular figures for money. Green means money saved, amber means above market. */
:root { --fog: #F4F4F5; --rule: #E4E4E7; --save: #15803D; --save-bg: #ECFDF3; --amber: #B45309; --amber-bg: #FFF7E6; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.warn-text { color: var(--amber); font-size: 13px; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; }
.back::before { content: "‹ "; }
.back:hover { color: var(--ink); }

/* Request page */
.req-page { display: flex; flex-direction: column; gap: 40px; }
.req-h1 { font-size: 34px; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 -16px; }
.brief { border-top: 2px solid var(--ink); padding-top: 18px; }
.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brief-head h2, .found-head h2, .cp-wanted h2, .cp-more h2 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.brief-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 32px; }
.brief-key { display: flex; flex-direction: column; gap: 22px; }
.brief-budget { display: flex; flex-direction: column; gap: 2px; }
.brief-budget > span, .brief-cars > span { font-size: 13px; color: var(--subtle); }
.brief-budget b { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.brief-budget small { font-size: 13px; color: var(--muted); }
.brief-brands { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: b; display: flex; flex-direction: column; gap: 8px; }
.brief-brands li { counter-increment: b; display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; font-size: 16px; }
.brief-brands li::before { content: counter(b); grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.brief-brands li span { font-size: 14px; color: var(--muted); }
.brief-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; align-content: start; }
.brief-list div { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 128px 1fr; gap: 10px; }
.brief-list dt { font-size: 13px; color: var(--subtle); padding-top: 1px; }
.brief-list dd { margin: 0; font-size: 14px; }
.brief-notes { margin: 22px 0 0; padding: 14px 18px; background: var(--fog); border-radius: 10px; }
.brief-notes span { font-size: 13px; color: var(--subtle); }
.brief-notes p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; white-space: pre-line; max-width: 72ch; }

.found { border-top: 2px solid var(--ink); padding-top: 18px; }
.found-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px; background: var(--fog); border-radius: 12px; margin: 0 0 6px; }
.filters .fl { display: flex; flex-direction: column; gap: 4px; flex: 1 1 130px; min-width: 0; }
.filters .fl span { font-size: 12px; color: var(--muted); }
.filters select { height: 38px; font-size: 14px; background-color: #fff; border-color: var(--rule); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; }
.filters select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.fl-count { flex: 1 1 100%; margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.filters.compact { margin-bottom: 0; }
.cars-empty { padding: 28px 0; color: var(--muted); font-size: 15px; }

.cars { list-style: none; margin: 0; padding: 0; }
.car { border-bottom: 1px solid var(--rule); }
.car-link { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px 0; color: inherit; text-decoration: none; }
.car-link:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.car-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.car-img { aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: var(--fog); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--faint); }
.car-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-main { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.car-main h3 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.tag { font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; }
.tag-best { background: var(--ink); color: #fff; }
.car-specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.car-fit { margin: 2px 0 0; font-size: 13px; color: var(--save); }
.car-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 3px; min-width: 190px; }
.car-price > b { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.car-price .hint { font-size: 12px; }
.save { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 6px; margin-top: 4px; text-decoration: none; }
.save.pos { background: var(--save-bg); color: var(--save); }
.save.neg { background: var(--amber-bg); color: var(--amber); }
.save.par { background: var(--fog); color: var(--ink); }

/* Car page */
.car-page { display: flex; flex-direction: column; gap: 32px; }
.cp-title h1 { font-size: 38px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 600; margin: 8px 0 14px; max-width: 22ch; }
.cp-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cp-facts div { padding: 10px 22px 10px 0; margin-right: 22px; border-right: 1px solid var(--rule); }
.cp-facts div:last-child { border-right: 0; }
.cp-facts dt { font-size: 12px; color: var(--subtle); }
.cp-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; }
.cp-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.cp-media .media-wrap { position: static; }
.cp-media .media-main { position: relative; border-radius: 14px; overflow: hidden; }
.cp-media .gallery img, .cp-media .gallery.empty { aspect-ratio: 3 / 2; }
.cp-media .gallery.empty { border-radius: 14px; }
.cp-media .thumb-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 6px; padding: 0; }
.cp-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.cp-price { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border-radius: 14px; border: 1px solid var(--rule); }
.cp-price-l { font-size: 13px; color: var(--muted); }
.cp-total { font-size: 44px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.cp-budget { font-size: 13px; }
.cp-budget.ok { color: var(--save); } .cp-budget.no { color: var(--err); }
.cp-price .btn { width: 100%; margin-top: 10px; justify-content: center; }
.cp-incl { font-size: 13px; color: var(--muted); align-self: center; }
.cp-hl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cp-hl li { font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 10px; }
.cp-hl li::before { content: "✓"; color: var(--save); font-weight: 600; }
.cp-wanted { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 2px solid var(--ink); }
.cp-wanted ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 20px; }
.cp-wanted li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.cp-wanted li small { display: block; color: var(--subtle); font-size: 12px; margin-top: 2px; }
.cp-wanted .w-sym { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.cp-wanted .w-ok .w-sym { background: #16A34A; } .cp-wanted .w-no .w-sym { background: #DC2626; } .cp-wanted .w-ask .w-sym { background: #D97706; } .cp-wanted .w-na .w-sym { background: #A1A1AA; }

/* Market analysis */
.dd { display: flex; flex-direction: column; gap: 22px; border-top: 2px solid var(--ink); padding-top: 20px; }
.dd-head h2 { font-size: 28px; letter-spacing: -0.03em; font-weight: 600; margin: 0; }
.dd-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 70ch; }
.dd h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 12px; }
.dd-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dd-panel { border: 1px solid var(--rule); border-radius: 14px; padding: 20px; }
.dd-price { display: flex; flex-direction: column; align-items: center; text-align: center; }
.dd-price h3 { align-self: flex-start; }
.dd-mp { margin: 0; display: flex; flex-direction: column; }
.dd-mp span { font-size: 13px; color: var(--muted); }
.dd-mp b { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.dd-gauge { width: 100%; max-width: 330px; margin: 6px 0 0; }
.dd-ends { width: 100%; max-width: 360px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -4px; }
.dd-ends span { display: flex; flex-direction: column; align-items: flex-start; }
.dd-ends span:last-child { align-items: flex-end; }
.dd-ends b { font-size: 14px; color: var(--ink); font-weight: 600; }
.dd-yours { margin: 14px 0 0; display: flex; flex-direction: column; }
.dd-yours span { font-size: 13px; color: var(--muted); }
.dd-yours b { font-size: 20px; font-weight: 600; }
.dd-stats dl { margin: 0; }
.dd-stats dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.dd-stats dl div:last-child { border-bottom: 0; }
.dd-stats dt { font-size: 14px; color: var(--muted); }
.dd-stats dd { margin: 0; text-align: right; display: flex; flex-direction: column; }
.dd-stats dd b { font-size: 17px; font-weight: 600; }
.dd-stats dd small { font-size: 12px; color: var(--subtle); }
.dd-verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; }
.dd-verdict p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 80ch; }
.dd-verdict.pos { background: var(--save-bg); } .dd-verdict.neg { background: var(--amber-bg); } .dd-verdict.par { background: var(--fog); }
.dd-verdict .verdict { flex: none; margin-top: 1px; }
.dd-chart { margin: 0; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 16px 12px; }
.dd-chart svg { width: 100%; height: auto; display: block; }
.dd-chart .g { stroke: #EFEFF1; stroke-width: 1; }
.dd-chart .tk { font-family: 'Geist', system-ui, sans-serif; font-size: 11px; fill: var(--subtle); font-variant-numeric: tabular-nums; }
.dd-chart .ax { fill: var(--muted); }
.dd-chart .trend { stroke: #EA580C; stroke-width: 2; }
.dd-chart .live { fill: #22A35A; fill-opacity: .75; }
.dd-chart .gone { fill: #E0A526; fill-opacity: .6; }
.dd-chart .me { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.dd-chart .cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: .5; }
.dd-chart figcaption { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.dd-chart figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.dd-chart figcaption i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-me { background: var(--ink); } .k-live { background: #22A35A; } .k-gone { background: #E0A526; }
.k-priv { border-radius: 0 !important; width: 0 !important; height: 0 !important; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid #A1A1AA; }
.k-trend { height: 2px !important; width: 16px !important; border-radius: 0 !important; background: #EA580C; }
.dd-list { display: flex; flex-direction: column; gap: 4px; }
.comp-head { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.9fr); gap: 16px; padding: 12px 0 8px; font-size: 12px; color: var(--subtle); border-bottom: 1px solid var(--ink); }
.comps { list-style: none; margin: 0; padding: 0; }
.comp { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.9fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.comp > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.comp-model b { font-size: 15px; font-weight: 600; }
.comp-model span, .comp-src span, .comp-time span { color: var(--muted); }
.comp-price b { font-size: 17px; font-weight: 600; }
.comp-price .pos { color: var(--save); font-size: 13px; } .comp-price .neg { color: var(--amber); font-size: 13px; }
.comp-src a { color: var(--ink); text-underline-offset: 3px; }
.comp-time .st { font-size: 12px; font-weight: 500; }
.comp-time .st.live { color: var(--save); } .comp-time .st.gone { color: var(--amber); }
.dd-method { margin: 0; font-size: 12px; color: var(--subtle); max-width: 90ch; line-height: 1.5; }
.dd .analysis { border: 1px solid var(--rule); border-radius: 14px; }

.cp-more { display: flex; flex-direction: column; gap: 0; border-top: 2px solid var(--ink); padding-top: 20px; }
.cp-more h2 { margin-bottom: 8px; }
.cp-acc { border-bottom: 1px solid var(--rule); }
.cp-acc > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; font-weight: 600; font-size: 16px; }
.cp-acc > summary::-webkit-details-marker { display: none; }
.cp-acc > summary::after { content: "+"; font-weight: 400; color: var(--muted); font-size: 22px; line-height: 1; }
.cp-acc[open] > summary::after { content: "−"; }
.cp-acc > summary > span:first-child { flex: 1; }
.cp-acc > :not(summary) { padding: 0 0 20px; }
.cp-acc .costs { max-width: 560px; }

@media (max-width: 900px) {
  .brief-grid, .dd-top, .cp-hero { grid-template-columns: 1fr; }
  .cp-side { position: static; }
  .cp-wanted { grid-template-columns: 1fr; }
  .car-link { grid-template-columns: 160px minmax(0, 1fr); }
  .car-price { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; text-align: left; min-width: 0; gap: 4px 10px; }
  .comp-head { display: none; }
  .comp { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .brief-list { grid-template-columns: 1fr; }
  .brief-list div { grid-template-columns: 112px 1fr; }
  .car-link { grid-template-columns: 1fr; gap: 12px; }
  .cp-title h1 { font-size: 28px; }
  .cp-total { font-size: 36px; }
  .cp-media .thumb-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .filters .fl { flex: 1 1 40%; }
  .dd-panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.dd-chart .ax { paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.comp-src a { text-decoration: underline; text-decoration-color: var(--field); }

/* Back office: cost groups, inline commission, transport page */
.cost-group { border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px 10px; margin: 6px 0 14px; }
.cost-group legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.row5 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cost-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 4px; border-top: 1px dashed var(--field); margin-top: 6px; font-size: 14px; }
.cost-sum b { font-size: 17px; }
.cost-group textarea { width: 100%; }
.recalc-notes { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.recalc-notes:empty { display: none; }
.cm-edit summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 4px; font-family: 'Geist', system-ui, sans-serif; }
.cm-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 190px; }
.cm-form select, .cm-form input { height: 34px; font-size: 13px; padding: 0 8px; }
.cm-form .btn { height: 34px; }
.cm-form .hint { font-family: 'Geist', system-ui, sans-serif; white-space: normal; }
.tr-calc { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.tr-calc form input[name=place] { flex: 1 1 260px; }
.tr-table th { width: 160px; background: none; font-size: 14px; color: var(--ink); }
.tr-table tr.sum th, .tr-table tr.sum td { border-top: 1px solid var(--ink); }
.rates-form { display: flex; flex-direction: column; gap: 12px; }
.rates-form h3 { font-size: 15px; margin: 8px 0 0; }
.rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rate { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.rate input { height: 38px; }
@media (max-width: 900px) { .row5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tr-calc .btn, .rates-form .btn { width: auto; }

/* Car overview (description, key features, specifications) */
.cp-over { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; border-top: 2px solid var(--ink); padding-top: 20px; }
.cp-over h2 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 12px; }
.cp-about p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 64ch; }
.cp-about p.lede { font-size: 19px; line-height: 1.5; color: var(--ink); letter-spacing: -0.01em; }
.cp-about h3 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
.kf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.kf li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.kf-ico { width: 20px; height: 20px; flex: none; color: var(--ink); }
.cp-spec dl { margin: 0; }
.cp-spec dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.cp-spec dt { color: var(--muted); }
.cp-spec dd { margin: 0; text-align: right; font-weight: 500; }

/* Saving breakdown, ownership, activity */
.sb-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 96px; gap: 14px; align-items: center; margin-bottom: 10px; }
.sb-l { font-size: 14px; color: var(--muted); }
.sb-row b { text-align: right; font-size: 17px; font-weight: 600; }
.sb-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--fog); }
.sb-bar .seg { height: 100%; }
.seg.ee, i.ee { background: #A1A1AA; }
.seg.s-car, i.s-car { background: #18181B; } .seg.s-trans, i.s-trans { background: #52525B; } .seg.s-reg, i.s-reg { background: #A1A1AA; } .seg.s-fee, i.s-fee { background: #D4D4D8; }
.seg.gap, i.gap { background: repeating-linear-gradient(135deg, #BBF7D0 0 6px, #DCFCE7 6px 12px); }
.sb-key { list-style: none; margin: 12px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); }
.sb-key li { display: inline-flex; align-items: center; gap: 7px; }
.sb-key b { color: var(--ink); font-weight: 600; }
.sb-key li.pos b { color: var(--save); }
.sb-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dd-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ow-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.ow-table th, .ow-table td { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; text-align: left; font-weight: 400; color: var(--muted); }
.ow-table td { text-align: right; color: var(--ink); font-weight: 600; font-size: 16px; }
.ow-sum { margin: 6px 0; font-size: 14px; font-weight: 500; }
.comp-price .adj { font-size: 12px; color: var(--subtle); border-bottom: 1px dotted var(--field); align-self: flex-start; cursor: help; }
@media (max-width: 900px) { .cp-over, .dd-two { grid-template-columns: 1fr; } .sb-row { grid-template-columns: 1fr auto; } .sb-row .sb-bar { grid-column: 1 / -1; grid-row: 2; } .kf { grid-template-columns: 1fr; } }
.data-check { margin: 18px 0 8px; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }
.data-check h3 { margin: 0 0 10px; font-size: 15px; }
.dc { list-style: none; margin: 0; padding: 0; }
.dc-car { padding: 10px 0; border-top: 1px solid var(--rule); }
.dc-car:first-child { border-top: 0; }
.dc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dc-head .btn { width: auto; margin-left: auto; }
.dc-state { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.dc-state.ok { background: var(--save-bg); color: var(--save); } .dc-state.warn { background: var(--amber-bg); color: var(--amber); }
.dc-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.dc-list li.warn { color: var(--ink); } .dc-list li.fixed { color: var(--muted); }

/* Exact-car price: hero, build-up, facts, pop-ups */
.he { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.he-card, .dd-facts button { font: inherit; color: inherit; text-align: left; cursor: pointer; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.he-card:hover, .dd-facts button:hover { border-color: var(--ink); }
.he-card:focus-visible, .dd-facts button:focus-visible, .build button:focus-visible, .info:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.he-card > span, .dd-facts button > span { font-size: 13px; color: var(--muted); }
.he-card b { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.he-card small, .dd-facts small { font-size: 12px; color: var(--subtle); line-height: 1.4; }
.he-save.pos { background: var(--save-bg); border-color: #BBF7D0; } .he-save.pos b { color: var(--save); }
.he-save.neg { background: var(--amber-bg); border-color: #FDE68A; } .he-save.neg b { color: var(--amber); }
.he-save.par { background: var(--fog); }
.build { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.bu { border-bottom: 1px solid var(--rule); }
.bu > button, .bu > div { width: 100%; font: inherit; color: inherit; background: none; border: 0; padding: 12px 4px; display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 14px; align-items: center; text-align: left; cursor: pointer; }
.bu > div { cursor: default; grid-template-columns: minmax(0, 1fr) auto 22px; }
.bu > button:hover { background: var(--fog); }
.bu-l { display: flex; flex-direction: column; gap: 2px; }
.bu-l b { font-size: 15px; font-weight: 500; }
.bu-l small { font-size: 12px; color: var(--subtle); }
.bu-a { font-size: 16px; font-weight: 600; text-align: right; }
.bu-i, .info { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--field); color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.bu.base .bu-l b, .bu.sub .bu-l b { font-weight: 600; }
.bu.sub { background: var(--fog); }
.bu.std .bu-a { color: var(--subtle); font-weight: 400; font-size: 13px; }
.bu.total { border-bottom: 2px solid var(--ink); }
.bu.total .bu-l b { font-size: 17px; font-weight: 600; }
.bu.total .bu-a { font-size: 22px; }
.dd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.dd-facts b { font-size: 20px; font-weight: 600; }
.info { cursor: pointer; margin-left: 6px; vertical-align: middle; padding: 0; font-family: inherit; }
.info:hover { border-color: var(--ink); color: var(--ink); }
.pop { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 680px); overflow: auto; border: 1px solid var(--rule); border-radius: 16px; padding: 0; box-shadow: 0 24px 60px rgba(0,0,0,.18); background: #fff; color: var(--ink); }
.pop::backdrop { background: rgba(10,10,10,.28); }
.pop-head { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 10px; border-bottom: 1px solid var(--rule); }
.pop-head h4 { margin: 0; font-size: 17px; font-weight: 600; }
.pop-x { border: 0; background: var(--fog); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.pop-body { padding: 14px 18px 18px; font-size: 14px; line-height: 1.55; }
.pop-body p { margin: 0 0 10px; color: var(--muted); }
.pop-body .costs { gap: 6px; }
.pop-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.pop-table th { text-align: left; font-weight: 500; color: var(--subtle); padding: 6px 4px; border-bottom: 1px solid var(--ink); }
.pop-table td { padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.pop-table tr.me td { background: var(--fog); font-weight: 600; }
.pop-list { list-style: none; margin: 6px 0 0; padding: 0; }
.pop-list li { padding: 5px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.pop-list li.me { color: var(--ink); font-weight: 600; }
.pop-list b { display: inline-block; width: 22px; }
.dd-stats dt { display: flex; align-items: center; }
@media (max-width: 900px) { .he { grid-template-columns: 1fr; } .he-card b { font-size: 28px; } }
.bu-a.zero { color: var(--subtle); font-weight: 400; font-size: 13px; }

/* Clearer, clickable market analysis (v2) */
.car-page > .dd { border-top: 0; padding: 28px; margin-top: 4px; background: #FBFBFC; border: 1px solid var(--rule); border-radius: 20px; }
.dd-head h2 { font-size: 30px; }
.dd-hint { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0 !important; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--rule); font-size: 13px !important; color: var(--ink) !important; }
.plus { width: 16px; height: 16px; flex: none; }
.he { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1.1fr); align-items: stretch; gap: 8px; }
.he-op { align-self: center; justify-self: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; }
.he-card { position: relative; padding: 20px 20px 16px; box-shadow: 0 1px 0 rgba(10,10,10,.04); }
.he-card:hover, .dd-facts button:hover { border-color: var(--ink); box-shadow: 0 6px 18px rgba(10,10,10,.08); transform: translateY(-1px); }
.he-card, .dd-facts button { transition: border-color .15s, box-shadow .15s, transform .15s; }
.he-card b { font-size: 38px; }
.he-save b { font-size: 42px; }
.he-more { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px !important; font-weight: 600; color: var(--ink) !important; text-decoration: underline; text-decoration-color: var(--field); text-underline-offset: 4px; }
.he-card:hover .he-more, .dd-facts button:hover .he-more { text-decoration-color: var(--ink); }
.he-save.pos .he-more { color: var(--save) !important; }
.he-card small { margin-bottom: 2px; }
.dd-facts button { min-height: 150px; }
.bu > button { grid-template-columns: minmax(0, 1fr) auto 70px; }
.bu > div { grid-template-columns: minmax(0, 1fr) auto 70px; }
.bu-i { width: auto; height: auto; border: 0; border-radius: 0; background: none; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: underline; text-decoration-color: var(--field); text-underline-offset: 3px; justify-content: flex-end; }
.bu > button:hover .bu-i { color: var(--ink); text-decoration-color: var(--ink); }
.build { background: #fff; border-radius: 12px; border: 1px solid var(--rule); border-top: 1px solid var(--rule); overflow: hidden; }
.bu > button, .bu > div { padding: 13px 16px; }
.bu.total { border-bottom: 0; background: var(--ink); color: #fff; }
.bu.total .bu-l b, .bu.total .bu-a { color: #fff; }
.dd-panel { background: #fff; }
.info { width: 22px; height: 22px; font-weight: 600; }
@media (max-width: 900px) {
  .car-page > .dd { padding: 18px; border-radius: 16px; }
  .he { grid-template-columns: 1fr; }
  .he-op { margin: -4px auto; }
  .he-card b { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { .he-card, .dd-facts button { transition: none; } .he-card:hover, .dd-facts button:hover { transform: none; } }

/* Buyer: check a car they found */
.check-car { border-top: 2px solid var(--ink); padding-top: 20px; }
.ck-head h2 { font-size: 22px; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.ck-head p { margin: 6px 0 18px; color: var(--muted); font-size: 15px; max-width: 70ch; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
.ck-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ck-steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.ck-steps li::before { content: counter(s); grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ck-steps b { font-size: 15px; font-weight: 600; }
.ck-steps span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ck-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--rule); border-radius: 14px; background: #FBFBFC; }
.fl-block { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.fl-block input, .fl-block select, .fl-block textarea { font-size: 15px; color: var(--ink); background: #fff; }
.ck-manual summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.ck-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tag-own { background: #EEF2FF; color: #3730A3; }
.ck-added { margin: 0; }
@media (max-width: 900px) { .ck-grid { grid-template-columns: 1fr; } .ck-fields { grid-template-columns: 1fr; } }

/* Buyer-added car: banner and no-photo card */
.ck-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 16px; border-radius: 12px; background: #F5F7FF; border: 1px solid #E0E7FF; }
.ck-banner .ck-added { flex: 1 1 320px; margin: 0; font-size: 14px; line-height: 1.5; color: #312E81; }
.ck-banner .btn { width: auto; }
.cp-nophoto { aspect-ratio: 16 / 10; border-radius: 14px; background: linear-gradient(180deg, #F6F6F7, #EDEDF0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--ink); }
.cp-nophoto svg { width: 150px; color: #A1A1AA; }
.cp-nophoto b { font-size: 26px; letter-spacing: -0.02em; font-weight: 600; }
.cp-nophoto span { font-size: 14px; color: var(--muted); max-width: 36ch; }
.cp-nophoto .btn { width: auto; margin-top: 4px; }
.req { color: var(--err); font-style: normal; }
.ck-review { border: 1px solid var(--rule); border-radius: 12px; padding: 14px; margin: 0; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.ck-review legend { font-weight: 600; font-size: 15px; padding: 0 6px; }
.ck-review .ck-fields { margin-top: 0; }
.ck-status:empty { display: none; }
.ck-form [data-ck-read] { width: auto; align-self: flex-start; }
.ck-form .filled { background: #F0FDF4; transition: background .6s; }
.ck-review[hidden] { display: none; }

/* Booking */
.book-page .book { display: flex; flex-direction: column; gap: 18px; }
.book-car { display: flex; gap: 14px; align-items: center; }
.book-car img { width: 120px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.pay-h { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.book-form { display: flex; flex-direction: column; gap: 14px; }
.bk-modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk-modes legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }
.bk-mode { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; background: #fff; }
.bk-mode:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.bk-mode input { margin-top: 3px; accent-color: var(--ink); }
.bk-mode span { display: flex; flex-direction: column; gap: 3px; }
.bk-mode b { font-size: 15px; }
.bk-mode small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.bk-offer { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--fog); }
.bk-offer[hidden] { display: none; }
.booking-page { display: flex; flex-direction: column; gap: 18px; }
.bp-new { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--save-bg); border: 1px solid #BBF7D0; color: var(--save); }
.bp-new b { font-size: 18px; }
.bp-new span { color: var(--ink); font-size: 14px; }
.bp-car { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--rule); border-radius: 14px; color: inherit; text-decoration: none; }
.bp-car:hover { border-color: var(--ink); }
.bp-car img, .bp-ph { width: 96px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--fog); display: block; }
.bp-car span { display: flex; flex-direction: column; gap: 2px; }
.bp-car small { font-size: 13px; color: var(--muted); }
.bp-price { text-align: right; }
.bp-price b { font-size: 22px; font-weight: 600; }
.bp-offer { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--rule); }
.bp-offer span { font-size: 13px; color: var(--muted); } .bp-offer b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 20px; }
.bp-offer small { font-size: 14px; } .bp-offer q { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin-top: 4px; }
.bp-offer.pending { background: var(--amber-bg); border-color: #FDE68A; } .bp-offer.accepted { background: var(--save-bg); border-color: #BBF7D0; } .bp-offer.declined { background: var(--fog); }
.timeline { list-style: none; margin: 6px 0 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 0 0 22px; position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 32px; bottom: 2px; width: 2px; background: var(--rule); }
.timeline li.done:not(:last-child)::before { background: var(--ink); }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--rule); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--subtle); }
.timeline li.done .tl-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.timeline li.now .tl-dot { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px rgba(10,10,10,.08); }
.timeline li div { display: flex; flex-direction: column; gap: 3px; padding-top: 6px; }
.timeline li b { font-size: 16px; font-weight: 600; }
.timeline li:not(.done):not(.now) b { color: var(--subtle); font-weight: 500; }
.timeline li span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.timeline em { font-style: normal; font-size: 12px; font-weight: 600; background: var(--ink); color: #fff; padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.bp-help { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; padding: 14px 16px; background: var(--fog); border-radius: 12px; }
.bp-cancel { display: flex; flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.bp-cancel .btn { width: auto; }
.bp-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #fff; text-decoration: none; }
.bp-banner span:first-child { display: flex; flex-direction: column; gap: 2px; }
.bp-banner small { color: #D4D4D8; font-size: 13px; }
.bp-banner .btn { background: #fff; color: var(--ink); width: auto; }
@media (max-width: 640px) { .bk-modes { grid-template-columns: 1fr; } .bp-car { grid-template-columns: 72px 1fr; } .bp-price { grid-column: 1 / -1; text-align: left; } }
.bk-admin { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.mail-check { margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; } .mail-check .btn { width: auto; }
