/* Moja zóna – AUTO-IMPEX. Design tokens and components.
   One family (Archivo) in two widths: expanded for model names and prices, normal for reading. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..800&display=swap");

:root {
  --ink: #18202b;
  --ink-2: #3c4757;
  --muted: #5f6b7a;
  --paper: #f5f6f4;
  --surface: #ffffff;
  --rule: #d9dee3;
  --rule-strong: #b9c1ca;
  --red: #c8102e;
  --red-ink: #a00c24;
  --ok: #1d7a4c;
  --ok-bg: #e4f2ea;
  --amber: #9a5b00;
  --amber-bg: #fdf1dc;
  --info-bg: #e9eef6;
  --focus: #1d5fd1;
  --r-sheet: 4px;
  --r-ctl: 10px;
  --r-pill: 999px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.8125rem; /* 13 */
  --step-0: 1rem; /* 16 */
  --step-1: 1.1875rem; /* 19 */
  --step-2: 1.5rem; /* 24 */
  --step-3: 2rem; /* 32 */
  --step-4: 2.75rem; /* 44 */
  font-family: var(--font);
  font-feature-settings: "tnum" 1, "lnum" 1;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { display: flex; flex-direction: column; min-height: 100vh; font-size: var(--step-0); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--red-ink); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; flex: 1; }

/* type */
h1, h2, h3 { font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: var(--step-3); font-weight: 750; }
h2 { font-size: var(--step-2); font-weight: 700; margin-bottom: 12px; }
h3 { font-size: var(--step-1); font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.lead { color: var(--ink-2); margin: 8px 0 24px; font-size: var(--step-1); max-width: 62ch; }
.num { font-variant-numeric: tabular-nums; font-stretch: 108%; }

/* header & footer */
.top { background: var(--ink); color: #fff; }
.top-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; min-height: 64px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.logo { font-weight: 800; font-stretch: 125%; letter-spacing: 0.02em; font-size: 18px; }
.sub { color: #b8c2cf; font-size: 15px; }
#nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
#nav a, #nav button { color: #d9e0e8; text-decoration: none; background: none; border: 0; padding: 10px 12px; border-radius: var(--r-ctl); cursor: pointer; font-size: 15px; }
#nav a[aria-current="page"], #nav a:hover, #nav button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.banner { background: var(--amber-bg); color: #5a3a00; border-bottom: 1px solid #ecd6a8; padding: 8px 16px; font-size: var(--step--1); text-align: center; }
.banner.live { background: var(--ok-bg); color: #0f4d2e; border-color: #b8dcc6; }
.foot { max-width: 1120px; width: 100%; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 16px 32px; font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--rule); }

/* surfaces: one quiet panel style; hierarchy comes from space and rules, not shadows */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 20px; }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stack > * + * { margin-top: 20px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--r-ctl); border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; font-weight: 650; min-height: 46px; line-height: 1.2; }
.btn:hover { background: #2a3442; color: #fff; }
.btn.primary { background: var(--red); border-color: var(--red); }
.btn.primary:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
input, textarea, select { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); background: #fff; color: var(--ink); min-height: 46px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
textarea { min-height: 96px; resize: vertical; }
.field + .field { margin-top: 14px; }
.error { color: var(--red-ink); font-size: 15px; margin-top: 8px; }
.notice { background: var(--info-bg); border: 1px solid #c7d3e6; color: #1f3a66; border-radius: var(--r-sheet); padding: 12px 14px; font-size: 15px; }

/* lists */
.offer { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; text-decoration: none; }
.offer .title { font-weight: 700; font-size: var(--step-1); font-stretch: 110%; }
.offer .meta { color: var(--muted); font-size: 15px; }
.offer .price { font-weight: 800; font-size: var(--step-2); text-align: right; white-space: nowrap; font-stretch: 112%; }
.offer .price .old { display: block; font-weight: 400; font-size: var(--step--1); color: var(--muted); text-decoration: line-through; }
.status { display: inline-block; font-size: var(--step--1); font-weight: 650; padding: 2px 10px; border-radius: var(--r-pill); }
.status.pending { background: var(--amber-bg); color: #6b3f00; }
.status.accepted { background: var(--ok-bg); color: #0f4d2e; }
.status.declined, .status.rejected { background: #eceff2; color: var(--muted); }
.status.expired { background: #fbe4e7; color: var(--red-ink); }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.kv .total dt, .kv .total dd { font-size: var(--step-1); font-weight: 800; color: var(--ink); border-top: 1px solid var(--rule); padding-top: 10px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
ul.plain li:last-child { border-bottom: 0; }
details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
details.sub { margin-left: 4px; }
details.sub summary { font-weight: 500; font-size: 15px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; font-size: 15px; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule-strong); background: #fff; margin-left: 4px; }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.current .dot { border-color: var(--red); box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.15); }
.timeline li:not(.done):not(.current) { color: var(--muted); }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 440px; overflow: auto; padding: 4px; }
.msg { max-width: 82%; padding: 10px 12px; border-radius: 14px; font-size: 15px; }
.msg.customer { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.staff { align-self: flex-start; background: #edf0f3; border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: var(--step--1); }
.msg .who { display: block; font-size: var(--step--1); opacity: 0.75; margin-bottom: 2px; }
.chatform { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.chatform textarea { min-height: 46px; }

.salesperson { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-stretch: 110%; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: var(--step--1); }
td.ok { color: var(--ok); font-weight: 700; }
td.bad { color: var(--red-ink); font-weight: 700; }
td.warn { color: var(--amber); font-weight: 700; }
code { font-size: 13px; background: #edf0f3; padding: 1px 5px; border-radius: 4px; }

.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
.thread-list .item { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 12px 14px; cursor: pointer; margin-bottom: 8px; }
.thread-list .item.active { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.thread-list .item.sla { border-color: #e2b766; background: #fffaf0; }
.badge { display: inline-block; background: var(--red); color: #fff; border-radius: var(--r-pill); padding: 0 8px; font-size: 12px; font-weight: 700; margin-left: 6px; line-height: 20px; }
.tag { display: inline-block; font-size: 12px; font-weight: 650; background: #edf0f3; color: var(--ink-2); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }

.car { display: block; object-fit: cover; background: #e9ecef; border-radius: var(--r-sheet); }
.car.thumb { width: 160px; height: 104px; }
.car.hero-img { width: 100%; height: 300px; object-fit: contain; background: #e9ecef; }
.car.cmp { width: 100%; height: 96px; margin-bottom: 6px; }
.nocar { display: grid; place-items: center; color: var(--muted); font-weight: 700; font-stretch: 120%; }
.interior { width: 100%; height: 160px; object-fit: cover; border-radius: var(--r-sheet); margin-top: 12px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 10px 0 20px; }
.hero-body h1 { margin: 4px 0 6px; font-size: var(--step-4); font-stretch: 118%; }
.hero-price { font-size: var(--step-3); font-weight: 800; margin-top: 10px; font-stretch: 115%; }
.hero-price .old { font-size: var(--step-0); font-weight: 400; color: var(--muted); text-decoration: line-through; margin-right: 10px; }
.hero-price .per { font-size: var(--step-0); font-weight: 500; color: var(--ink-2); font-stretch: 100%; }
.warn { color: var(--amber); font-weight: 600; }
.ok { color: var(--ok); }
.notice.change { background: var(--amber-bg); border-color: #ecd6a8; color: #5a3a00; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule-strong); border-radius: var(--r-pill); padding: 7px 14px; font-size: 15px; background: #fff; cursor: pointer; min-height: 40px; font-weight: 500; margin: 0; }
.chip input { width: auto; min-height: 0; margin: 0; accent-color: var(--ink); }
.chip:has(input:checked) { border-color: var(--ink); background: #edf0f3; }
table.compare th { text-align: left; vertical-align: bottom; }
table.compare tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 15px; }
table.compare td { font-weight: 650; }

@media (max-width: 760px) {
  .wrap { padding-top: 20px; }
  h1 { font-size: 1.75rem; }
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .hero-body h1 { font-size: 2rem; }
  .car.hero-img { height: 210px; }
  .offer { grid-template-columns: 1fr; }
  .offer .price { text-align: left; }
  .car.thumb { width: 100%; height: 170px; }
  .inbox { grid-template-columns: 1fr; }
}

/* cycle 2: header, skip link, phone tab bar */
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: var(--r-ctl); z-index: 50; }
.skip:focus { left: 8px; }
.mark { width: 26px; height: 26px; align-self: center; color: #fff; }
.brand { align-items: center; }
.nav-wide { display: contents; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; background: var(--surface); border-top: 1px solid var(--rule); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 72px; min-height: 48px; justify-content: center; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; background: none; border: 0; border-radius: var(--r-ctl); cursor: pointer; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { color: var(--red); }
@media (max-width: 760px) {
  .tabbar:not([hidden]) { display: flex; }
  body.has-tabbar .nav-wide { display: none; }
  body.has-tabbar .foot { padding-bottom: 96px; }
  .sub { display: none; }
  .top-inner { min-height: 56px; }
  #nav a, #nav button { padding: 8px 10px; font-size: 14px; }
}

/* cycle 3: offer list */
.offer-list { display: grid; gap: 12px; }
.offer-row { display: grid; grid-template-columns: 176px 1fr; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 12px; text-decoration: none; color: var(--ink); }
.offer-row:hover { color: var(--ink); border-color: var(--ink); }
.offer-row .car.thumb { width: 176px; height: 112px; }
.offer-row .title-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.offer-row .title { font-weight: 750; font-size: var(--step-1); font-stretch: 112%; line-height: 1.2; }
.offer-row .price { font-weight: 800; font-size: var(--step-2); font-stretch: 112%; white-space: nowrap; text-align: right; color: var(--ink); }
.offer-row .price .old { display: block; font-weight: 400; font-size: var(--step--1); color: var(--muted); text-decoration: line-through; font-stretch: 100%; }
.offer-row .meta { color: var(--muted); font-size: 15px; margin-top: 3px; }
.status-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.list-h { font-size: var(--step-1); margin: 32px 0 12px; }
.old-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 4px 14px; }
.old-list li { align-items: center; }
.empty { border: 1px dashed var(--rule-strong); border-radius: var(--r-sheet); padding: 24px; background: var(--surface); }
.empty p { margin: 0 0 12px; }
@media (max-width: 760px) {
  .offer-row { grid-template-columns: 96px 1fr; gap: 12px; padding: 10px; align-items: start; }
  .offer-row .car.thumb { width: 96px; height: 72px; }
  .offer-row .title-line { flex-direction: column; gap: 2px; }
  .offer-row .title { font-size: 17px; }
  .offer-row .price { text-align: left; font-size: 20px; }
  .offer-row .price .old { display: inline; margin-right: 6px; }
  .offer-row .meta { font-size: 14px; }
}

/* cycle 3 fixes */
ul.old-list { padding: 2px 16px; }

/* cycle 4: hero + key facts */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin: 12px 0 0; background: none; border: 0; padding: 0; }
.hero-media .car.hero-img { width: 100%; height: 320px; object-fit: contain; background: linear-gradient(#eef0f2, #e2e6ea); border-radius: var(--r-sheet); }
.eyebrow-line { margin: 0; color: var(--muted); font-size: 15px; }
.hero-body h1 { font-size: 2.25rem; font-stretch: 118%; font-weight: 780; margin: 4px 0 6px; line-height: 1.08; }
.hero-spec { margin: 0 0 12px; color: var(--ink-2); }
.hero-price { font-size: 2.5rem; font-weight: 800; font-stretch: 116%; margin: 14px 0 2px; line-height: 1.1; }
.hero-price .old { display: block; font-size: var(--step-0); font-weight: 400; color: var(--muted); text-decoration: line-through; font-stretch: 100%; }
.per { margin: 0 0 16px; color: var(--ink-2); }
.hero .actions { margin-top: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 24px 0 28px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts > div { padding: 12px 16px 14px 0; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: var(--step-1); font-weight: 750; font-stretch: 110%; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 14px; }
  .hero-media .car.hero-img { height: 200px; }
  .hero-body h1 { font-size: 1.75rem; }
  .hero-price { font-size: 2rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div + div { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}

/* cycle 5: page structure */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.quiet-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 15px; }
.note { margin: 0 0 28px; max-width: 70ch; }
.note blockquote { margin: 0; font-size: var(--step-1); line-height: 1.45; color: var(--ink); white-space: pre-line; padding-left: 18px; border-left: 3px solid var(--red); }
.note figcaption { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-left: 18px; color: var(--muted); font-size: 15px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.secnav { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; overflow-x: auto; background: var(--paper); border-bottom: 1px solid var(--rule); margin: 0 -16px 24px; padding: 8px 16px; scrollbar-width: none; }
.secnav a { white-space: nowrap; text-decoration: none; padding: 8px 12px; border-radius: var(--r-ctl); font-weight: 600; font-size: 15px; color: var(--ink-2); }
.secnav a:hover { background: #e9ecef; color: var(--ink); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--r-pill); background: #e3e7eb; color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.count.new { background: var(--red); color: #fff; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.side-col { position: sticky; top: 64px; display: grid; gap: 20px; }
.sec { scroll-margin-top: 72px; }
.main-col > .sec + .sec { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--rule); }
.sec h2 { font-size: var(--step-2); margin-bottom: 14px; }
.sec p { margin: 0 0 12px; }
.subsec { margin-top: 24px; }
.subsec h3 { font-size: var(--step-1); }
.disclosures { margin-top: 16px; border-top: 1px solid var(--rule); }
.disclosures > details { border-bottom: 1px solid var(--rule); }
.disclosures > details > summary { padding: 12px 0; font-size: var(--step-0); }
.price-sec, .fin-sec, .person { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 20px; }
.price-sec .kv + .kv { margin-top: 16px; padding-top: 4px; }
.fin-big { font-size: var(--step-3); font-weight: 800; font-stretch: 114%; margin: 0 0 10px; }
.fin-big span { font-size: var(--step-0); font-weight: 500; color: var(--muted); font-stretch: 100%; }
.pname { font-weight: 700; font-stretch: 108%; }
.person .actions { margin: 14px 0 10px; }
.next { margin-bottom: 16px; }
.actform { margin: 0 0 16px; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); }
.actform .actions { margin-top: 10px; }
.docs { list-style: none; margin: 0; padding: 0; }
@media (max-width: 960px) {
  .detail-grid { display: flex; flex-direction: column; gap: 0; }
  .main-col, .side-col { display: contents; }
  .side-col { position: static; }
  .price-sec { order: -2; margin-bottom: 28px; }
  .fin-sec { order: -1; margin-bottom: 28px; }
  .person { order: 10; margin-top: 28px; }
  .main-col > .sec + .sec { margin-top: 32px; }
}

/* cycle 6: window sticker */
.sticker { background: #fff; border: 1px solid var(--rule-strong); border-top: 8px solid var(--ink); border-radius: 0 0 var(--r-sheet) var(--r-sheet); padding: 14px 20px 18px; }
.st-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.04em; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; }
.sticker h2 { font-size: var(--step-1); margin-bottom: 10px; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; align-items: baseline; gap: 0; padding: 5px 0; font-size: 15px; }
.lines li > span:first-child { color: var(--ink-2); }
.lines li > i { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--rule-strong); margin: 0 8px; transform: translateY(-4px); }
.lines li > span:last-child { font-weight: 650; white-space: nowrap; }
.lines li.minus > span:last-child { color: var(--ok); }
.lines li.total { justify-content: space-between; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.lines li.total > span:first-child { color: var(--ink); font-weight: 700; font-size: var(--step-0); }
.lines li.total > span:last-child { font-size: var(--step-3); font-weight: 800; font-stretch: 114%; color: var(--ink); line-height: 1; }
.lines li.fine { font-size: var(--step--1); padding: 2px 0; }
.lines li.fine > span { color: var(--muted) !important; font-weight: 400 !important; }
.lines.extra { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--rule-strong); }
.lines li.total.pay > span:last-child { font-size: var(--step-2); }
.st-foot { margin: 14px 0 0 !important; font-size: var(--step--1); color: var(--muted); }
@media (max-width: 960px) { .sticker { order: -2; margin-bottom: 28px; } }

/* cycle 7: delivery track */
ol.timeline { list-style: none; margin: 18px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); counter-reset: none; }
ol.timeline li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px 0 0; font-size: 14px; }
ol.timeline li::before { content: ""; position: absolute; top: 8px; left: 18px; right: 0; height: 3px; background: var(--rule); }
ol.timeline li.done::before { background: var(--ok); }
ol.timeline li:last-child::before { display: none; }
ol.timeline .dot { position: relative; z-index: 1; width: 19px; height: 19px; margin: 0; border-radius: 50%; border: 3px solid var(--rule-strong); background: var(--paper); }
ol.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
ol.timeline li.current .dot { border-color: var(--red); background: #fff; box-shadow: 0 0 0 5px rgba(200, 16, 46, 0.14); }
ol.timeline .lbl { font-weight: 650; line-height: 1.25; color: var(--ink); }
ol.timeline li:not(.done):not(.current) .lbl { color: var(--muted); font-weight: 500; }
ol.timeline .when { font-size: var(--step--1); color: var(--muted); }
ol.timeline li.current .when { color: var(--red-ink); font-weight: 650; }
@media (max-width: 760px) {
  ol.timeline { grid-template-columns: 1fr; gap: 0; }
  ol.timeline li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 0 0 18px; }
  ol.timeline li::before { top: 19px; bottom: 0; left: 8px; right: auto; width: 3px; height: auto; }
}
.subsec .btn { margin-top: 14px; }
.delivery-first .main-col { display: flex; flex-direction: column; }
.delivery-first #dodanie { order: -1; }
.delivery-first .main-col > #vozidlo { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--rule); }
.delivery-first .main-col > #dodanie { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 960px) {
  .delivery-first .main-col { display: contents; }
  .delivery-first #dodanie { order: -3; margin-bottom: 8px; }
}

/* cycle 8: conversation */
.chat { background: #eef0ed; border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 12px; max-height: 520px; min-height: 140px; gap: 6px; }
.chat-empty { margin: auto; color: var(--muted); font-size: 15px; text-align: center; max-width: 34ch; }
.day { display: flex; justify-content: center; margin: 8px 0 4px; }
.day span { font-size: 12px; font-weight: 650; color: var(--muted); background: #e2e5e1; border-radius: var(--r-pill); padding: 2px 10px; }
.msg { max-width: 80%; padding: 9px 12px 6px; border-radius: 14px; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.msg .txt { white-space: pre-line; }
.msg .who { font-size: 12px; font-weight: 700; opacity: 1; color: var(--ink-2); margin: 0; }
.msg .t { align-self: flex-end; font-size: 11px; opacity: 0.7; }
.msg.staff { background: #fff; border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.msg.customer { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.request { align-self: flex-end; background: #fff; border: 1px solid var(--ink); border-left: 4px solid var(--red); border-radius: var(--r-sheet); color: var(--ink); }
.req-h { font-weight: 750; font-stretch: 108%; }
.req-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.req-tags span { font-size: 12px; font-weight: 650; background: #edf0f3; border-radius: var(--r-pill); padding: 1px 8px; }
.req-note { white-space: pre-line; color: var(--ink-2); }
.docchip { display: flex; align-items: center; gap: 10px; text-decoration: none; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); padding: 8px 10px; margin: 2px 0; color: var(--ink); }
.docchip:hover { border-color: var(--ink); color: var(--ink); }
.docchip > span:last-child { display: flex; flex-direction: column; }
.docchip.gone { color: var(--muted); font-size: 14px; }
.ftype { display: inline-grid; place-items: center; width: 38px; height: 46px; flex: none; border-radius: 3px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; font-stretch: 120%; letter-spacing: 0.02em; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.chatform { margin-top: 10px; }
.chatform textarea { min-height: 56px; }
#chatinfo { margin-top: 6px; }

/* cycle 9: documents */
.docs { display: grid; gap: 10px; }
.doc a { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); text-decoration: none; color: var(--ink); }
.doc a:hover { border-color: var(--ink); color: var(--ink); }
.doc.is-new a { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--red); }
.dbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dtitle { font-weight: 700; font-stretch: 106%; }
.dmeta { font-size: var(--step--1); color: var(--muted); overflow-wrap: anywhere; }
.dnote { font-size: 15px; color: var(--ink-2); }
.dopen { font-weight: 650; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.ftype.alt { background: var(--ink-2); }
@media (max-width: 760px) { .doc a { grid-template-columns: auto 1fr; } .dopen { display: none; } }

/* cycle 10: phone action bar on an offer */
.offer-bar { display: none; }
@media (max-width: 760px) {
  body.on-offer .tabbar { display: none !important; }
  body.on-offer .offer-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; display: flex; align-items: center; gap: 8px; background: var(--surface); border-top: 1px solid var(--rule); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .ob-price { flex: 1; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
  .ob-price .num { font-weight: 800; font-size: 19px; font-stretch: 112%; }
  .ob-price .small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ob-msg { padding: 8px 12px; }
  .offer-bar .btn.sm { min-height: 46px; }
  body.on-offer .foot { padding-bottom: 104px; }
}
@media (max-width: 760px) {
  body.on-offer .offer-bar { transform: translateY(110%); transition: transform 0.18s ease-out; }
  body.on-offer .offer-bar.show { transform: none; }
  body.on-offer .tabbar { display: none !important; }
}

/* cycle 11: salesperson side */
.find { display: flex; gap: 12px; align-items: flex-end; max-width: 560px; margin-bottom: 24px; }
.find .field { flex: 1; margin: 0; }
.uploader .up-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; }
.uploader .field { margin: 0 0 12px; }
.uploader input[type=file] { padding: 9px; background: var(--paper); }
.uploader select { appearance: auto; }
.up-status { color: var(--ink-2); align-self: center; }
.docs.staff .dwrap { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.docs.staff li:last-child .dwrap { border-bottom: 0; }
.dstate { font-size: var(--step--1); color: var(--amber); font-weight: 600; }
.dstate.seen { color: var(--ok); }
.staff-docs { align-items: start; }
.th-h { font-size: var(--step-1); margin-bottom: 12px; }
.th-h .small { font-stretch: 100%; font-weight: 500; margin-left: 8px; }
.th-docs { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 6px; }
.th-docs .uploader { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule-strong); }
.canned-row { margin-top: 10px; }
.canned-row .chip { font-size: 14px; min-height: 36px; }
#thread .chat { max-height: 420px; }
@media (max-width: 760px) { .uploader .up-row { grid-template-columns: 1fr; } .find { flex-direction: column; align-items: stretch; } }
.inbox .msg.request { align-self: flex-start; }

/* cycle 12: sign-in */
.login { max-width: 520px; margin: 24px auto 0; }
.login-panel { background: var(--surface); border: 1px solid var(--rule-strong); border-top: 8px solid var(--ink); border-radius: 0 0 var(--r-sheet) var(--r-sheet); padding: 28px; }
.login-panel h1 { font-size: 2rem; font-stretch: 116%; }
.login-panel .lead { font-size: var(--step-0); margin: 10px 0 22px; }
.login-panel .field .small { display: block; margin-top: 6px; }
.login-actions { margin-top: 20px; justify-content: space-between; }
.login-actions .btn.primary { flex: 1; }
.login-about { margin-top: 18px; padding: 0 4px; }
.login-about ul { padding-left: 20px; margin: 6px 0 10px; color: var(--ink-2); }
.login-about li + li { margin-top: 4px; }
@media (max-width: 760px) { .login { margin-top: 8px; } .login-panel { padding: 20px; } .login-panel h1 { font-size: 1.6rem; } .login-actions .btn { flex: 1 1 100%; } }

/* cycle 13: overview, comparison, loading */
.agenda { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.agenda li { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.cal { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 60px; background: var(--surface); border: 1px solid var(--rule-strong); border-top: 5px solid var(--red); border-radius: var(--r-sheet); line-height: 1; }
.cal b { font-size: 24px; font-weight: 800; font-stretch: 115%; }
.cal span { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ag-body { display: flex; flex-direction: column; gap: 2px; }
.ag-body b { font-stretch: 106%; }
.ov-lower { margin-top: 36px; }
.ov-lower .sec h2 { font-size: var(--step-1); }
.cmp-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 8px 16px 12px; }
table.compare { min-width: 520px; }
table.compare thead th { vertical-align: bottom; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.cmp-name { display: block; font-size: var(--step-1); font-weight: 750; font-stretch: 110%; color: var(--ink); text-decoration: none; margin-bottom: 2px; }
.cmp-name:hover { text-decoration: underline; }
table.compare tr.same td, table.compare tr.same th { color: var(--muted); font-weight: 500; }
table.compare tr.diff td { font-weight: 700; color: var(--ink); }
table.compare tr.diff th { color: var(--ink); }
.skel i { display: block; background: linear-gradient(90deg, #e8ebe7 25%, #f0f2ef 50%, #e8ebe7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: var(--r-sheet); }
.skel .h { height: 36px; width: 46%; margin-bottom: 20px; }
.skel .row { height: 136px; margin-bottom: 12px; }
.skel-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; margin-top: 30px; }
.skel-hero .img { height: 300px; }
.skel-hero .l { height: 16px; width: 70%; margin-top: 12px; }
.skel-hero .l.short { width: 40%; }
.skel-hero .p { height: 44px; width: 55%; margin-top: 26px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) { .skel-hero { grid-template-columns: 1fr; } .skel-hero .img { height: 200px; } .agenda li { grid-template-columns: 56px 1fr; } .agenda li .btn { grid-column: 2; justify-self: start; } }

/* cycle 14: accessibility */
:root { --ctl-border: #7d8794; }
input, textarea, select { border-color: var(--ctl-border); }
.btn.ghost { border-color: var(--ctl-border); }
.chip { border-color: var(--ctl-border); }
.day span { color: var(--ink-2); }
.docchip { border-color: var(--ctl-border); }

/* cycle 15: phone polish */
@media (max-width: 760px) {
  .secnav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .kv { grid-template-columns: minmax(96px, auto) 1fr; }
  .next .actions .btn { flex: 1 1 100%; }
}

/* cycle 16: review fixes */
#nav .logout { display: inline-flex; align-items: center; gap: 6px; }
#nav .logout svg { width: 20px; height: 20px; }
@media (max-width: 760px) { #nav .logout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } #nav .logout { min-width: 44px; min-height: 44px; justify-content: center; } }
.hero-price-label { margin: 14px 0 0; font-size: var(--step--1); font-weight: 650; color: var(--ink-2); }
.hero-price { margin-top: 0; }
.hero-price a { color: inherit; text-decoration: none; }
.hero-price a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hero h1, .offer-row h2, .offer-row h3 { text-wrap: balance; }
.sent-badge { display: inline-block; margin: 12px 0 0; padding: 6px 12px; background: var(--ok-bg); color: #0f4d2e; border-radius: var(--r-pill); font-size: var(--step--1); font-weight: 650; }
.drive-line { margin: 10px 0 0; font-size: 15px; }
.drive-line b { margin-right: 4px; }
.fin-status { margin: -4px 0 8px !important; }
/* red only for the primary action */
.note blockquote { border-left-color: var(--ink); }
.count.new { background: var(--ink); }
.doc.is-new a { box-shadow: inset 4px 0 0 var(--ink); }
.ftype { background: var(--ink-2); }
.msg.request { border-left-color: var(--ink); }
ol.timeline li.current .dot, .timeline li.current .dot { border-color: var(--ink); box-shadow: 0 0 0 5px rgba(24, 32, 43, 0.12); }
.cal { border-top-color: var(--ink); }
.tabbar a[aria-current="page"] svg { color: var(--ink); }
.badge { background: var(--ink); }
/* whole document card clickable, visible affordance */
.doc a { cursor: pointer; }
.dopen { font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 760px) { .doc a { grid-template-columns: auto 1fr auto; } .dopen { display: inline; } }
/* phone: sections full width, order sticker > documents > messages > financing > vehicle */
@media (max-width: 960px) {
  .detail-grid { align-items: stretch; }
  .detail-grid > * , .main-col > .sec, .side-col > .sec { width: 100%; }
  .sticker { order: 1; }
  #dodanie { order: 2; }
  #dokumenty { order: 3; }
  #spravy { order: 4; }
  .fin-sec { order: 5; }
  #vozidlo { order: 6; }
  .person { order: 10; }
  .detail-grid .sec + .sec, .detail-grid > .sec { margin-top: 0; }
  .detail-grid { gap: 32px; }
  .delivery-first #dodanie { order: 0; }
  .sticker, .fin-sec, .person { margin-bottom: 0 !important; margin-top: 0 !important; }
  .delivery-first .main-col > #vozidlo { margin-top: 0; padding-top: 0; border-top: 0; }
  .hero .actions .btn { flex: 1 1 100%; }
}

/* cycle 17: test-drive widget inside the zone (the widget's own styles, zone tokens) */
.aitj, .aitj-dialog {
  --aitj-red: var(--red);
  --aitj-red-dark: var(--red-ink);
  --aitj-ink: var(--ink);
  --aitj-graphite: var(--ink-2);
  --aitj-muted: var(--muted);
  --aitj-line: var(--rule);
  --aitj-mist: var(--paper);
  --aitj-free: var(--ok);
  --aitj-display: var(--font);
  --aitj-text: var(--font);
}
.aitj-dialog { font-family: var(--font); }
.aitj-h, .aitj-ticket__model { font-stretch: 112%; font-weight: 750; letter-spacing: 0; }
.aitj-ticket__model { font-size: 30px; line-height: 1.05; }
.aitj-h { font-size: 26px; line-height: 1.1; }
.aitj-btn { border-radius: var(--r-ctl); }
.aitj-input { border-color: var(--ctl-border); border-radius: var(--r-ctl); }
.msg.request.drive .drive-when { font-weight: 750; font-stretch: 110%; font-size: var(--step-1); }

/* cycle 18: offer list, login */
.offer-row { grid-template-columns: 176px minmax(0, 1fr) auto 20px; }
.offer-row .title { display: block; text-wrap: balance; }
.offer-row:hover { border-color: var(--rule); }
@media (hover: hover) { .offer-row:hover { border-color: var(--ink); } .offer-row:hover .chev { transform: translateX(3px); } }
.offer-row .chev { font-size: 28px; line-height: 1; color: var(--muted); transition: transform .15s; }
.offer-row .status-line .warn { display: inline-block; background: var(--amber-bg); color: var(--amber); border-radius: var(--r-pill); padding: 1px 8px; font-weight: 650; }
@media (max-width: 760px) {
  .offer-row { grid-template-columns: 96px minmax(0, 1fr); }
  .offer-row .price { grid-column: 2; margin-top: -4px; }
  .offer-row .chev { display: none; }
  .old-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
}
.staff-link { margin: 14px 0 0; }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: var(--step--1); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.linkbtn:hover { color: var(--ink); }
.secnav { padding-left: 4px; }
.secnav a:first-child { margin-left: 0; }

/* cycle 19: accepted offer hero, delivery track */
.hero-delivery { margin: 14px 0 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule-strong); border-left: 4px solid var(--ok); border-radius: var(--r-sheet); }
.hero-delivery p { margin: 0 0 6px; }
.hero-delivery .hd-now { font-size: var(--step-1); }
.hero-delivery .btn { margin-top: 6px; }
ol.timeline li .dot { background: #fff; }
ol.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
ol.timeline li.now .dot { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 5px rgba(24, 32, 43, 0.12); }
ol.timeline li:not(.done) .lbl { color: var(--muted); }
ol.timeline li.now .lbl { color: var(--ink); font-weight: 750; }
.now-tag { display: block; font-size: 12px; font-weight: 750; color: var(--ink); }

/* cycle 20: staff thread and uploader */
.th-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.th-top .th-h { margin: 0; }
.canned-row .chip { white-space: normal; text-align: left; line-height: 1.3; }
.flabel { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 14px; border: 2px dashed var(--ctl-border); border-radius: var(--r-ctl); background: var(--paper); text-align: center; cursor: pointer; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop.over { border-color: var(--ink); background: #e9ecef; }
.drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.drop-t { font-weight: 700; word-break: break-word; }
.uploader button[type=submit]:disabled { opacity: .5; cursor: not-allowed; }
.older { margin: 10px 0; }
.older summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.msg .drive-when { font-weight: 750; font-stretch: 110%; }
.person-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 0 0 8px; } .person-links .linkbtn { font-size: inherit; }

/* redesign R1: hero on a stage, spec as chips */
.hero-media { position: relative; background: #e8ebe8; border-radius: var(--r-sheet); overflow: hidden; }
.hero-media::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 13%; height: 6%; border-radius: 50%; background: rgba(24, 32, 43, 0.16); filter: blur(10px); z-index: 0; }
.hero-media .hero-img { position: relative; z-index: 1; background: transparent; }
.hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 14px; padding: 0; }
.hero-chips li { font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 3px 11px; }
.eyebrow-line { font-size: var(--step--1); color: var(--muted); }

/* redesign R2: "Váš postup" band */
.journey { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 28px 0 8px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); }
.jsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jsteps li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-right: 6px; }
.jsteps li::before { content: ""; position: absolute; top: 10px; left: 22px; right: 0; height: 2px; background: var(--rule); }
.jsteps li:last-child::before { display: none; }
.jsteps li.done::before { background: var(--ok); }
.jdot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule-strong); background: #fff; display: grid; place-items: center; color: #fff; }
.jsteps li.done .jdot { background: var(--ok); border-color: var(--ok); }
.jsteps li.planned .jdot { border-color: var(--ink); border-style: dashed; }
.jsteps li.cur .jdot { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(24, 32, 43, 0.12); }
.jl { font-size: 14px; font-weight: 650; color: var(--ink-2); line-height: 1.2; }
.jsteps li:not(.done):not(.cur):not(.planned) .jl { color: var(--muted); font-weight: 500; }
.jsteps li.cur .jl { color: var(--ink); font-weight: 750; }
.jw { font-size: 12px; color: var(--muted); min-height: 15px; }
.jnext { border-left: 1px solid var(--rule); padding-left: 24px; }
.jnext p { margin: 0 0 6px; color: var(--ink-2); }
.jnext .nx-h { font-size: var(--step-1); font-weight: 750; color: var(--ink); font-stretch: 105%; }
.jnext .actions { margin-top: 10px; }
@media (max-width: 960px) {
  .journey { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .jnext { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 14px; }
}
@media (max-width: 560px) {
  .jsteps li .jw { display: none; }
  .jl { font-size: 12px; }
}
.jnext .actions { align-items: center; } .jnext .linkbtn { margin-left: 4px; }

/* redesign R3: other ways to the same car */
.ex-h { font-size: var(--step-1); margin: 4px 0 2px; }
.ex-sub { margin: 0 0 12px; }
.stock { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.stock-card { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 10px 14px 10px 10px; }
.sc-img { width: 120px; height: 76px; background: #e8ebe8; border-radius: 3px; overflow: hidden; }
.sc-img img { width: 100%; height: 100%; object-fit: contain; }
.sc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-title { font-weight: 750; font-stretch: 108%; }
.sc-meta { font-size: 14px; color: var(--ink-2); }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.tag { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: var(--r-pill); background: #eef0ed; color: var(--ink-2); }
.tag.new { background: var(--ok-bg); color: #0f4d2e; }
.tag.demo { background: var(--info-bg); color: #1b3d73; }
.tag.cur { background: var(--ink); color: #fff; }
.sc-price { font-weight: 800; font-stretch: 112%; font-size: var(--step-1); text-align: right; white-space: nowrap; }
.sc-price .old { display: block; font-size: 13px; font-weight: 400; color: var(--muted); text-decoration: line-through; }
.versions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ver { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 14px 16px; }
.ver.is-cur { border-color: var(--ink); }
.v-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v-name { font-weight: 800; font-stretch: 112%; font-size: var(--step-1); }
.v-price { font-weight: 750; font-size: var(--step-1); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.v-diff { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.v-extras { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--ink-2); }
.v-extras li::before { content: "+ "; color: var(--ok); font-weight: 800; }
.ver .btn { margin-top: auto; align-self: flex-start; }
.ver .small.muted { margin: 4px 0 0; }
.msg.request.drive.cancelled .drive-when { text-decoration: line-through; color: var(--muted); }
@media (max-width: 760px) {
  .stock-card { grid-template-columns: 96px minmax(0, 1fr); }
  .sc-img { width: 96px; height: 64px; }
  .sc-price { grid-column: 2; text-align: left; }
  .stock-card .btn { grid-column: 1 / -1; }
}

/* redesign R4: list rows say what is next */
.row-next { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.row-next b { color: var(--ink); font-weight: 700; }
.offer-row .meta + .meta { margin-top: 2px; }

/* redesign R5: conversation as one box with the salesperson on top */
.chatbox { border: 1px solid var(--rule); border-radius: var(--r-sheet); background: var(--surface); overflow: hidden; }
.chatbox .chat { border: 0; border-radius: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.ch-name { font-weight: 750; }
.ch-state { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ch-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.ch-state.on::before { background: var(--ok); }
.quickq { display: flex; gap: 8px; padding: 10px 14px 0; overflow-x: auto; scrollbar-width: none; }
.quickq .chip { white-space: nowrap; font-size: 14px; }
.chatbox .chatform { padding: 10px 14px 14px; margin: 0; }
.quickq { flex-wrap: wrap; }
@media (max-width: 760px) { .quickq { flex-wrap: nowrap; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }

/* redesign R6: ordered car */
.hd-bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; margin: 10px 0 2px; }
.hd-bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }

/* redesign R7: phone */
@media (max-width: 960px) {
  #moznosti { order: 6; }
  #vozidlo { order: 7; }
}
@media (max-width: 560px) {
  .jsteps li:not(.cur) .jl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .jsteps li.cur .jl { white-space: nowrap; font-size: 14px; }
  .jsteps li.cur:last-child .jl, .jsteps li.cur:nth-last-child(2) .jl { align-self: flex-end; }
  .hero-chips li { font-size: 13px; }
  .jnext .nx-h { font-size: 18px; }
}
@media (max-width: 960px) {
  .secnav a[href="#cena"] { order: 1; } .secnav a[href="#dodanie"] { order: 2; } .secnav a[href="#dokumenty"] { order: 3; }
  .secnav a[href="#spravy"] { order: 4; } .secnav a[href="#moznosti"] { order: 6; } .secnav a[href="#vozidlo"] { order: 7; }
}

/* redesign R8: salesperson sees the customer's activity next to the conversation */
.th-ctx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: var(--r-sheet); background: var(--paper); }
.th-ctx > div { padding: 10px 12px; border-right: 1px solid var(--rule); }
.th-ctx > div:last-child { border-right: 0; }
.th-ctx dt { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.th-ctx dd { margin: 0; font-size: 14px; line-height: 1.4; }
.th-ctx .status { font-size: 12px; }
@media (max-width: 960px) { .th-ctx { grid-template-columns: repeat(2, minmax(0, 1fr)); } .th-ctx > div:nth-child(2) { border-right: 0; } .th-ctx > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } }

/* redesign R9: login with what the zone holds */
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; max-width: 980px; margin: 32px auto 0; align-items: stretch; }
.login .login-panel { border-radius: var(--r-sheet) 0 0 var(--r-sheet); max-width: none; margin: 0; }
.login-side { background: var(--ink); color: #fff; padding: 32px 30px; border-radius: 0 var(--r-sheet) var(--r-sheet) 0; display: flex; flex-direction: column; gap: 18px; }
.ls-h { margin: 0; font-size: var(--step-1); font-weight: 750; font-stretch: 110%; }
.ls-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ls-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.ls-list svg { width: 26px; height: 26px; color: #fff; }
.ls-list span { color: #c9d0d8; font-size: 15px; line-height: 1.45; }
.ls-list b { display: block; color: #fff; font-weight: 700; }
.ls-foot { margin: auto 0 0; font-size: 13px; color: #9aa4b0; }
.ls-foot code { color: #fff; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; margin-top: 8px; }
  .login .login-panel { border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  .login-side { border-radius: 0 0 var(--r-sheet) var(--r-sheet); }
}
.ls-foot code { background: rgba(255,255,255,0.14); color: #fff; padding: 1px 6px; border-radius: 4px; }

/* redesign R11: printing an offer gives a clean one-document summary */
@media print {
  .top, .tabbar, .banner, .foot, .secnav, .offer-bar, #spravy, .skip, .quiet-links, .actions, .jnext .actions, #moznosti .btn, .person .actions, .person-links, .ex-act, .aitj-dialog { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .detail-grid { display: block; }
  .sec, .sticker, .journey, .hero { break-inside: avoid; }
  .sticker { margin-top: 18px; }
  details { display: block; } details > summary { list-style: none; }
  a { color: inherit; text-decoration: none; }
}
.quiet-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; } .quiet-links .linkbtn { font-size: inherit; }

/* redesign R12: after the independent review */
.status.pending { background: #eef0ed; color: var(--ink-2); }
.status.sent { background: var(--ok-bg); color: #0f4d2e; }
.offer-row .status-line .warn, .status-line .warn { display: inline-block; background: var(--amber-bg); color: var(--amber); border-radius: var(--r-pill); padding: 1px 8px; font-weight: 650; }
.nowrap { white-space: nowrap; }
.hero-total { margin-top: -8px; }
.hero-total a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--rule-strong); }
.jsteps li.skipped .jdot { border-style: dotted; border-color: var(--rule-strong); }
.jsteps li.skipped .jl { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.jdrive { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule-strong); }
.jdrive .jd-h { font-weight: 750; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.jdrive .tag { font-weight: 650; }
.v-extras.minus li::before { content: "– "; color: var(--muted); }
.v-extras.minus li { color: var(--muted); }
.sc-vs { display: block; font-size: 12px; font-weight: 500; color: var(--muted); font-stretch: 100%; }
.fin-note { margin: 10px 0 0 !important; }
.th-ctx { grid-template-columns: 1.2fr 1fr 1.6fr; }
.th-ctx .tdconfirm { margin-top: 6px; }
.offer-row { border-color: var(--rule) !important; }
@media (hover: hover) { .offer-row:hover { border-color: var(--ink) !important; } }
@media (hover: none) { #printoffer { display: none; } }
.person .small.muted { text-wrap: pretty; }
@media (max-width: 960px) {
  .fin-sec { order: 2; }
  #dodanie { order: 3; }
  #dokumenty { order: 4; }
  #spravy { order: 5; }
  #moznosti { order: 6; }
}
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat .msg.sys { align-self: center; max-width: 90%; background: #fff7e6; border: 1px dashed #d9a441; color: #5c3d00; font-size: 14px; }
/* Comfortable tap targets for small text links on touch screens (audit 24. 10.). */
@media (pointer: coarse) {
  .quiet-links a, .person-links .linkbtn, .salesperson a, .older a { display: inline-flex; align-items: center; min-height: 44px; }
}
