/* Secudeals – design system. Tokens first, then layout, components, views. */
:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --ink: #0b1b2b;
  --ink-2: #33475b;
  --muted: #56677a;
  --line: #dde3dc;
  --brand: #0e7c66;
  --brand-ink: #ffffff;
  --brand-soft: #e2f3ee;
  --brand-check: #c8f2e3;
  --accent: #f2a33a;
  --accent-soft: #fff3e0;
  --good: #1d8a5b;
  --warn: #b7791f;
  --bad: #c2453d;
  --good-soft: #e3f4ea;
  --warn-soft: #fbf0dc;
  --bad-soft: #fbe6e4;
  --hero: #0b1b2b;
  --hero-ink: #f3f7f5;
  --shadow: 0 1px 2px rgba(11,27,43,.06), 0 4px 18px rgba(11,27,43,.06);
  --shadow-lg: 0 10px 40px rgba(11,27,43,.14);
  --r: 14px;
  --r-sm: 9px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c141c; --surface: #121d27; --surface-2: #182632; --ink: #e8eef2; --ink-2: #c3cfd8; --muted: #8b9cab;
    --line: #233441; --brand: #2fb393; --brand-ink: #04140f; --brand-soft: #123a31; --brand-check: #0b1b2b;
    --accent: #f5b459; --accent-soft: #3a2a12; --good: #45c08a; --warn: #e3a948; --bad: #ef7a70;
    --good-soft: #12352a; --warn-soft: #3a2c12; --bad-soft: #3d1c1a; --hero: #070d13; --hero-ink: #eef4f2;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 18px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c141c; --surface: #121d27; --surface-2: #182632; --ink: #e8eef2; --ink-2: #c3cfd8; --muted: #8b9cab;
  --line: #233441; --brand: #2fb393; --brand-ink: #04140f; --brand-soft: #123a31; --brand-check: #0b1b2b;
  --accent: #f5b459; --accent-soft: #3a2a12; --good: #45c08a; --warn: #e3a948; --bad: #ef7a70;
  --good-soft: #12352a; --warn-soft: #3a2c12; --bad-soft: #3d1c1a; --hero: #070d13; --hero-ink: #eef4f2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; text-wrap: balance; }
h1 { letter-spacing: -.025em; }
p, li, dd { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 650; font-size: 1.22rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; color: var(--brand); }
.brand-word b { color: var(--brand); font-weight: 750; }
.mainnav { display: flex; gap: 4px; margin-left: 8px; }
.mainnav a { color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-weight: 550; font-size: .95rem; }
.mainnav a:hover { background: var(--surface-2); text-decoration: none; }
.mainnav a.on { color: var(--ink); background: var(--surface-2); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) {
  .topbar { backdrop-filter: none; background: var(--surface); } /* backdrop-filter would make the header the containing block of the fixed bottom nav */
  .mainnav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 45; }
  .mainnav a { font-size: .8rem; white-space: nowrap; padding: 8px 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  body { padding-bottom: 64px; }
  .topbar-in { height: 56px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: .95rem; line-height: 1.2; transition: transform .06s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn:active { transform: translateY(1px); }
.btn-primary { box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 8px color-mix(in srgb, var(--brand) 22%, transparent); }
.btn-dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.iconbtn { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; font-size: 1rem; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
textarea.input { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Cards & chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.pad { padding: 20px; }
.pad-lg { padding: 28px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.chip-accent { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.chip svg { width: 14px; height: 14px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--brand) 40%, transparent), transparent 60%), var(--hero); color: var(--hero-ink); padding: 56px 0 72px; overflow: hidden; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); letter-spacing: -.03em; max-width: 14ch; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: color-mix(in srgb, var(--brand) 55%, #9ff0d6); }
.hero-lead { font-size: clamp(1.02rem, 1.8vw, 1.22rem); color: color-mix(in srgb, var(--hero-ink) 78%, transparent); max-width: 52ch; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.hero-search { margin-top: 28px; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 10px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; box-shadow: var(--shadow-lg); max-width: 720px; }
.hero-search .input { border-color: transparent; background: var(--surface-2); }
@media (max-width: 700px) { .hero-search { grid-template-columns: 1fr 1fr; } .hero-search .q { grid-column: 1 / -1; } .hero-search .btn { grid-column: 1 / -1; } }
.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-pill { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; color: color-mix(in srgb, var(--hero-ink) 85%, transparent); }
.hero-pill i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 35%, transparent); font-style: normal; font-size: .8rem; }
.hero-visual { position: relative; }
.hero-card { transform: rotate(-2deg); }
.hero-card + .hero-card { position: absolute; right: -18px; bottom: -36px; width: 62%; transform: rotate(3deg); }

/* Sections */
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.wrap.section-tight { padding-left: 16px; padding-right: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head p { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 750; color: var(--brand); margin-bottom: 8px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }
.pillar { padding: 22px; }
.pillar .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.pillar .ico svg { width: 24px; height: 24px; }
.pillar p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.compare td:last-child { font-weight: 600; }
.compare .yes { color: var(--good); }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 20px; position: relative; }
.step::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 750; font-size: .9rem; margin-bottom: 12px; }

/* Listing cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.lcard { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s; position: relative; }
.lcard:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.lcard-media > img, .lcard-media > svg { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.lcard:hover .lcard-media > img, .lcard:hover .lcard-media > svg { transform: scale(1.035); }
@media (prefers-reduced-motion: reduce) { .lcard, .lcard-media > img, .lcard-media > svg { transition: none !important; } .lcard:hover { transform: none; } .lcard:hover .lcard-media > img, .lcard:hover .lcard-media > svg { transform: none; } }
.lcard-media { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden; }
.lcard-media > img, .lcard-media > svg { width: 100%; height: 100%; object-fit: cover; }
.lcard-badges { position: absolute; left: 10px; right: 96px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; } /* right: room for compare + favourite buttons */
.lcard-badges .chip { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); }
.lcard-fav { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--surface) 90%, transparent); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.lcard-fav.on { color: #e0475b; }
.lcard-fav svg { width: 18px; height: 18px; }
.lcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard-title { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.lcard-variant { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-specs { display: grid; gap: 2px; color: var(--ink-2); font-size: .85rem; }
.lcard-specs > div { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-specs span + span::before { content: "·"; margin-right: 8px; color: var(--muted); }
.lcard-bottom { margin-top: auto; }
.lcard-bottom .lcard-foot { margin-top: 0; }
.lcard-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.price { font-weight: 780; font-size: 1.35rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.price-label svg { width: 12px; height: 12px; }
.monthly { font-size: .8rem; color: var(--muted); text-align: right; }
.monthly b { color: var(--ink); }
.grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-weight: 800; font-size: .95rem; color: #fff; }
.grade-A { background: #126f48; } .grade-B { background: #2f7a2b; } .grade-C { background: #f2b544; color: #2a1d00; } .grade-D { background: #b0372f; }
.grade-lg { width: 54px; height: 54px; border-radius: 14px; font-size: 1.6rem; }
.lcard-seller { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: .8rem; min-width: 0; }
.lcard-seller > svg { width: 14px; height: 14px; flex: none; opacity: .8; }
.lcard-seller-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.insp-note { color: var(--warn); display: flex; gap: 6px; align-items: center; }
.stars { color: #b97a0e; letter-spacing: 1px; }
:root[data-theme="dark"] .stars { color: #f0b54a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stars { color: #f0b54a; } }
.demo-tag { position: absolute; right: 10px; bottom: 10px; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(11,27,43,.55); color: #fff; padding: 2px 7px; border-radius: 6px; }

/* Search layout */
.search-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding-top: 24px; padding-bottom: 48px; }
@media (max-width: 960px) { .search-layout { grid-template-columns: 1fr; } .filters { display: none; } .filters.open { display: block; position: fixed; inset: 0; z-index: 60; overflow: auto; border-radius: 0; } }
.filters { padding: 18px; align-self: start; position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; }
.filters .field + .field, .filters .fgroup + .fgroup { margin-top: 14px; }
.fgroup h4 { font-size: .85rem; margin: 0 0 8px; color: var(--ink-2); }
.range2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 11px; font-size: .85rem; cursor: pointer; font-weight: 550; }
.toggle.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toggle .cnt { color: var(--muted); font-weight: 500; margin-left: 4px; }
.toggle.on .cnt { color: inherit; opacity: .7; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-head h1 { font-size: 1.4rem; margin: 0; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* Listing page */
.crumbs { font-size: .85rem; color: var(--muted); padding: 18px 0 8px; }
.crumbs a { color: var(--muted); }
.lp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; padding-bottom: 56px; }
@media (max-width: 1000px) { .lp { grid-template-columns: minmax(0, 1fr); } }
.gallery { border-radius: var(--r); overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 10; position: relative; }
.gallery > img, .gallery > svg { width: 100%; height: 100%; object-fit: cover; }
.gal-tag { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: rgba(8, 20, 30, .78); color: #fff; }
.gal-tag svg { width: 14px; height: 14px; flex: none; }
.gal-tag-own { background: rgba(70, 45, 0, .82); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 92px; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--surface-2); }
.thumbs button.on { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lp-title h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 18px 0 4px; }
.specgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.specgrid div { background: var(--surface); padding: 12px 14px; }
.specgrid dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.specgrid dd { margin: 2px 0 0; font-weight: 650; }
.buybox { position: sticky; top: 78px; align-self: start; }
.buybox .price { font-size: 2.1rem; }
.lock-note { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: var(--r-sm); padding: 12px; font-size: .88rem; color: var(--ink-2); }
.lock-note svg { width: 20px; height: 20px; flex: none; color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.trust-list li { display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.trust-list .ok { color: var(--good); } .trust-list .no { color: var(--muted); }
.trust-list svg { width: 18px; height: 18px; flex: none; }
.trust-meter { display: flex; gap: 4px; }
.trust-meter i { height: 6px; flex: 1; border-radius: 3px; background: var(--surface-2); }
.trust-meter i.on { background: var(--brand); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--brand); }

/* Condition report */
.report-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
@media (max-width: 760px) { .report-cols { grid-template-columns: 1fr; } }
.carmap { width: 100%; max-width: 360px; margin: 0 auto; }
.carmap .zone { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; transition: fill .15s; }
.carmap .zone.s1 { fill: color-mix(in srgb, var(--warn) 25%, var(--surface)); }
.carmap .zone.s2 { fill: color-mix(in srgb, var(--warn) 55%, var(--surface)); }
.carmap .zone.s3 { fill: color-mix(in srgb, var(--bad) 60%, var(--surface)); }
.carmap .zone.hl { stroke: var(--ink); stroke-width: 2.5; }
.carmap text { font-size: 9px; fill: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; align-items: flex-start; }
.checklist li:last-child { border: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; }
.dot-ok { background: var(--good); } .dot-huom { background: var(--warn); } .dot-vika { background: var(--bad); }
.damage { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; cursor: default; }
.damage:last-child { border: 0; }
.sev { font-size: .72rem; font-weight: 750; padding: 2px 7px; border-radius: 6px; flex: none; height: fit-content; }
.sev-1 { background: var(--warn-soft); color: var(--warn); } .sev-2 { background: color-mix(in srgb, var(--warn) 30%, var(--surface)); color: var(--ink); } .sev-3 { background: var(--bad-soft); color: var(--bad); }
.scorebar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.scorebar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #9ff0d6)); }
.level-badge svg { width: 16px; height: 16px; flex: none; }
.level-badge { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.level-self { background: var(--surface-2); color: var(--ink-2); border: 1px dashed color-mix(in srgb, var(--ink) 30%, var(--line)); }
.level-pro { background: var(--brand); color: var(--brand-ink); }

/* Finance calculator */
.fin-grid { display: grid; gap: 14px; }
.fin-out { background: var(--surface-2); border-radius: var(--r-sm); padding: 14px; }
.fin-out .big { font-size: 1.8rem; font-weight: 780; letter-spacing: -.02em; }
input[type="range"] { width: 100%; accent-color: var(--brand); }

/* Timeline / deal room */
.dealsteps { display: flex; gap: 0; margin: 8px 0 24px; }
.dealsteps li { list-style: none; flex: 1; position: relative; text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; padding-top: 34px; }
.dealsteps li::before { content: ""; position: absolute; top: 12px; left: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.dealsteps li:last-child::before { display: none; }
.dealsteps li i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 27px; height: 27px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); z-index: 1; display: grid; place-items: center; font-style: normal; font-size: .75rem; }
.dealsteps li.done { color: var(--ink-2); } .dealsteps li.done i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); } .dealsteps li.done::before { background: var(--brand); }
.dealsteps li.current { color: var(--ink); } .dealsteps li.current i { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 14px 16px; position: relative; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.contract-doc { background: #fff; color: #111; border-radius: var(--r-sm); padding: 28px; font-family: Georgia, "Times New Roman", serif; font-size: .95rem; max-height: 480px; overflow: auto; border: 1px solid var(--line); }
.contract-doc h1, .contract-doc h2, .contract-doc h3 { font-family: var(--font); color: #111; }

/* Messages */
.msgs { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; padding: 4px; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 16px; background: var(--surface-2); font-size: .93rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.msg.them { border-bottom-left-radius: 4px; }
.msg .meta { display: block; font-size: .7rem; opacity: .7; margin-top: 3px; }
.msg-warn { background: var(--warn-soft); color: var(--ink); border-radius: var(--r-sm); padding: 10px 12px; font-size: .85rem; display: flex; gap: 8px; }

/* Toast + modal */
#toast-root { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); animation: tin .2s ease-out; pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal-back { position: fixed; inset: 0; background: rgba(5,12,18,.55); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fin .15s; }
@keyframes fin { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 18px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 0; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 16px 20px 20px; }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { padding: 16px; }
.kpi .v { font-size: 1.6rem; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table-wrap { overflow-x: auto; position: relative; }

/* Sell flow */
.wizard { max-width: 760px; margin: 0 auto; padding: 28px 16px 64px; }
.wsteps { display: flex; gap: 6px; margin-bottom: 22px; }
.wsteps i { height: 5px; flex: 1; border-radius: 3px; background: var(--line); }
.wsteps i.on { background: var(--brand); }
.plate { display: inline-flex; align-items: stretch; border: 2px solid #111; border-radius: 8px; overflow: hidden; background: #fff; color: #111; font-weight: 800; font-size: 1.6rem; letter-spacing: .08em; }
.plate .eu { background: #1d4fa3; color: #fff; font-size: .7rem; display: grid; place-items: center; padding: 0 6px; letter-spacing: 0; }
.plate input { border: 0; width: 7.5em; text-transform: uppercase; padding: 8px 12px; font-weight: 800; font-size: 1.6rem; letter-spacing: .08em; background: #fff; color: #111; }
.plate input:focus { outline: none; }
.anglegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.angle { border: 2px dashed var(--line); border-radius: 12px; aspect-ratio: 4/3; display: grid; place-items: center; text-align: center; font-size: .8rem; color: var(--muted); cursor: pointer; position: relative; overflow: hidden; background: var(--surface); padding: 6px; }
.angle.done { border-style: solid; border-color: var(--brand); }
.angle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.angle .ok { position: absolute; right: 6px; top: 6px; background: var(--brand); color: var(--brand-ink); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .75rem; z-index: 2; }
.commit-box { border: 2px solid var(--accent); background: var(--accent-soft); border-radius: var(--r); padding: 18px; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 20px; margin-top: 24px; }
.footer-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-cols h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer-cols a { display: block; color: var(--ink-2); font-size: .92rem; padding: 3px 0; }
.staging-note { margin-top: 24px; font-size: .78rem; color: var(--muted); }
.brand-foot { font-size: 1.1rem; }

/* Avatars */
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; color: #fff; flex: none; font-size: .95rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .78rem; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 50; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--ink); border: 0; background: none; cursor: pointer; font-size: .92rem; gap: 8px; align-items: center; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); text-decoration: none; }
.badge-count { background: var(--bad); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 6px; font-weight: 700; margin-left: auto; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.mobile-only, .mobile-filter { display: none; }
@media (max-width: 960px) { .mobile-only, .mobile-filter { display: inline-flex; } }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* views by agent 2 */
.btn svg, .msg-warn svg, .ico-inline { width: 18px; height: 18px; flex: none; }
.msg-warn { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.mono { font-family: var(--mono); font-size: .85em; overflow-wrap: anywhere; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.input-lg { font-size: 1.4rem; font-weight: 700; padding: 12px 14px; }
.linkbtn { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px; font-size: .85rem; }
.linkbtn:hover { color: var(--bad); }
.thumb { width: 96px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-2); }
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.thumb-sm { width: 72px; }
.rowcard { display: flex; gap: 14px; align-items: center; padding: 12px; color: var(--ink); }
a.rowcard:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.rowcard + .rowcard { margin-top: 10px; }
.tabs a { padding: 10px 14px; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--brand); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kv .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 750; color: var(--ink); }
.decision { border-radius: var(--r-sm); padding: 14px 16px; border: 1px solid var(--line); font-size: .92rem; }
.decision-good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.decision-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.decision-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.decision .ico-inline { display: inline-block; vertical-align: -3px; }
.celebrate { text-align: center; }
.celebrate .big-ico { font-size: 3rem; line-height: 1; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sell wizard */
.wsteps-labels { display: flex; gap: 6px; margin: -14px 0 22px; }
.wsteps-labels button { flex: 1; min-width: 0; border: 0; background: none; padding: 4px 0; font-size: .74rem; font-weight: 650; color: var(--muted); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsteps-labels button.on { color: var(--ink-2); }
.wsteps-labels button.cur { color: var(--ink); }
@media (max-width: 560px) { .wsteps-labels button:not(.cur) { color: transparent; } .wsteps-labels button.cur { overflow: visible; } }
.wnav { margin-top: 20px; }
.plate-sm { font-size: 1.1rem; }
.plate .plate-txt { padding: 4px 10px; }
.vcard { overflow: hidden; }
.vcard-media { aspect-ratio: 16 / 9; background: var(--surface-2); }
.vcard-media img, .vcard-media svg { width: 100%; height: 100%; object-fit: cover; }
.wizard .steps { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .wizard .steps { grid-template-columns: 1fr; } }
.commit-box .commit-ico svg { width: 26px; height: 26px; color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .opts { grid-template-columns: 1fr; } }
.opt { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--ink); }
.opt:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt > svg { width: 26px; height: 26px; color: var(--brand); }
.angle { flex-direction: column; gap: 4px; }
.angle .angle-ico { width: 26px; height: 26px; opacity: .6; }
.angle .lbl { position: relative; z-index: 1; line-height: 1.2; }
.angle.done .lbl { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; padding: 3px 4px; font-size: .72rem; }
.angle.busy { opacity: .6; pointer-events: none; }
.angle:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }
.checkrow { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.checkrow:last-child { border-bottom: 0; }
.checkrow > .input { grid-column: 1 / -1; }
.checkrow.missing > span { color: var(--bad); font-weight: 650; }
.checkrow .seg { justify-self: start; }
.checkrow .seg button { padding: 6px 10px; font-size: .82rem; }
.checkrow .seg button.on[data-v="huom"] { color: var(--warn); }
.checkrow .seg button.on[data-v="vika"] { color: var(--bad); }
@media (max-width: 560px) { .checkrow { grid-template-columns: 1fr; } }
.req { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.req li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.req svg { width: 20px; height: 20px; flex: none; }
.req .ok { color: var(--good); } .req .no { color: var(--muted); }
.preview-card { max-width: 340px; }
.ai-note { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.chat-form .input { flex: 1; min-width: 0; }

/* Deal room */
.deal-head { display: flex; gap: 14px; align-items: center; padding: 6px 0 14px; }
@media (max-width: 560px) { .deal-head { flex-wrap: wrap; } .deal-head .thumb { width: 72px; } }
.deal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; padding-bottom: 56px; }
@media (max-width: 1000px) { .deal-layout { grid-template-columns: 1fr; } }
.dealsteps { padding: 0; }
.dealsteps li { min-width: 0; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; padding-left: 2px; padding-right: 2px; }
@media (max-width: 480px) { .dealsteps li { font-size: .64rem; letter-spacing: -.01em; } }
.contract-frame { padding: 0; overflow: hidden; max-height: none; }
.contract-frame iframe { display: block; width: 100%; height: 480px; border: 0; background: #fff; }
.sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sig { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: .88rem; }
.sig.done { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-soft); }
.copyrow { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.addon { align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.addon:last-child { border-bottom: 0; }
.starpick { display: flex; gap: 2px; }
.starpick button { border: 0; background: none; font-size: 2rem; line-height: 1; color: var(--line); cursor: pointer; padding: 4px; border-radius: 6px; }
.starpick button.on { color: #f0a92e; }

/* Profile + admin */
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.profile-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }
.rating-sum { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; }
@media (max-width: 420px) { .rating-sum { grid-template-columns: 1fr; } }
.rating-big { font-size: 2.6rem; font-weight: 780; letter-spacing: -.03em; line-height: 1; }
.distbars { display: grid; gap: 6px; }
.distrow { display: grid; grid-template-columns: 36px 1fr 28px; gap: 8px; align-items: center; }
.distbar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.distbar i { display: block; height: 100%; background: #f0a92e; border-radius: 4px; }
.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.chart { width: 100%; height: auto; }
.chart .bar { fill: var(--brand); }
.chart .hit { fill: transparent; }
.chart .barg:hover .bar { fill: color-mix(in srgb, var(--brand) 75%, var(--ink)); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; }
.table td .btn { white-space: nowrap; }

/* Mobile buy bar on listing pages */
.buybar { display: none; }
.lp-quickbuy { display: none; margin-top: 14px; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 1000px) {
  .buybar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; justify-content: space-between; box-shadow: 0 -6px 20px rgba(11,27,43,.08); transform: translateY(110%); transition: transform .2s; }
  .buybar.show { transform: none; }
  /* Hidden bar must not peek over the bottom nav (the nav lives in the header's stacking context, so z-index alone cannot win). */
  .buybar:not(.show) { visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .lp-quickbuy { display: flex; }
}
@media (max-width: 760px) { .buybar { bottom: calc(56px + env(safe-area-inset-bottom)); } }
.price-old { text-decoration: line-through; color: var(--muted); font-weight: 600; margin-left: 6px; font-size: .95rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .82rem; }
.legal-links a { color: var(--muted); }
.doc { max-width: 760px; }
.doc h2 { margin-top: 28px; font-size: 1.2rem; }

/* ---------- i18n + Germany (docs/I18N.md) ---------- */
.topbar-lang { margin-left: auto; }
.topbar-lang + .topbar-actions { margin-left: 4px; }
.langsw { display: inline-flex; align-items: center; gap: 2px; font-size: .82rem; font-weight: 650; }
.langsw button { border: 0; background: transparent; color: var(--muted); padding: 6px 7px; border-radius: 8px; cursor: pointer; font: inherit; letter-spacing: .02em; }
.langsw button:hover { color: var(--ink); background: var(--surface-2); }
.langsw button.on { color: var(--ink); background: var(--surface-2); }
.langsw-sep { color: var(--line); user-select: none; }
.langsw-foot { margin-top: 10px; }
@media (max-width: 760px) { .hide-xs { display: none; } .langsw button { padding: 6px 5px; } }
.chip-flag { background: var(--surface-2); color: var(--ink); }
.lcard-landed { font-size: .8rem; color: var(--muted); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.landed .landed-row, .xborder .landed-row { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; align-items: baseline; }
.landed .landed-row > span:first-child, .xborder .landed-row > span:first-child { min-width: 0; }
.landed-total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-size: 1.02rem !important; }
.landed { border-left: 4px solid var(--brand); }
.xborder { border-left: 4px solid var(--accent); }
.xb-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.de-entry-box { background: linear-gradient(135deg, var(--surface) 0%, var(--brand-soft) 140%); }
.de-steps { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.de-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.de-steps svg { width: 20px; height: 20px; flex: none; color: var(--brand); margin-top: 1px; }
/* bilingual contract: languages side by side, stacked on phones */
.sd-contract .sd-bi { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 0 0 10px; }
.sd-contract .sd-bi > * { margin: 0; }
.sd-contract .sd-bi > [lang="en"] { color: var(--muted); }
.sd-contract ul .sd-bi { margin-bottom: 8px; }
.sd-contract li.sd-bi-li { list-style: none; }
.sd-contract .sd-bi-h, .sd-contract .sd-bi-i { color: var(--muted); font-weight: 500; }
.sd-contract .sd-draft { font-size: .82rem; color: var(--warn); }
@media (max-width: 640px) { .sd-contract .sd-bi { grid-template-columns: 1fr; } }

/* ---------- Extras: total cost, Ask AI, public answers, price schedule, pre-approval, buyer signal ---------- */
.ps-hint { background: var(--brand-soft); border-radius: var(--r-sm); padding: 8px 10px; font-size: .9rem; }
.ps-hint summary { display: flex; gap: 8px; align-items: center; cursor: pointer; list-style: none; font-weight: 650; color: var(--ink); }
.ps-hint summary::-webkit-details-marker { display: none; }
.ps-hint summary svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.ps-hint summary .ps-i { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.ps-hint p { margin: 8px 0 0; color: var(--ink-2); }
.ps-mini { display: flex; gap: 5px; align-items: center; color: var(--brand); font-weight: 650; margin-top: 2px; }
.ps-mini svg { width: 14px; height: 14px; flex: none; }
.ps-preview > * + * { margin-top: 6px; }
.ps-draft:not(:empty) { border: 1.5px dashed var(--line-strong, var(--line)); border-radius: 10px; padding: 10px; }
.ps-draft .ps-list li { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.chip-preview { background: transparent; border: 1px dashed currentColor; color: var(--muted); font-weight: 600; }
.ps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ps-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; background: var(--surface-2); border-radius: 8px; font-size: .9rem; }
.tco-big { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 780; letter-spacing: -.02em; line-height: 1.1; }
.tco-km output { font-weight: 650; }
.tco-range { width: 100%; accent-color: var(--brand); margin: 8px 0 2px; min-height: 28px; }
.tco .table td:first-child { overflow-wrap: anywhere; }
.tco-sum th, .tco-sum td { border-top: 2px solid var(--line); }
.tco-sum th { text-align: left; font-weight: 650; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: inherit; }
.ai-box { margin-top: 14px; border-left: 4px solid var(--brand); }
.ai-box h3 { display: flex; align-items: center; gap: 8px; }
.ai-ico { width: 20px; height: 20px; color: var(--brand); flex: none; }
.ai-form { display: flex; gap: 8px; }
.ai-form .input { flex: 1; min-width: 0; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip { border: 1px solid var(--line); cursor: pointer; white-space: normal; text-align: left; font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 10px; }
.ai-chip:hover { border-color: var(--brand); color: var(--ink); }
.ai-answer { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px; }
.ai-answer > .chip { margin-top: 8px; }
.ai-basis { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ai-basis .chip { white-space: normal; background: var(--surface); }
.qa-list { display: grid; gap: 10px; margin-top: 10px; }
.qa-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface); }
.qa-q { font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.qa-a { margin-top: 4px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.qa-item .iconbtn { flex: none; margin: -6px -6px 0 0; }
.pa-card { grid-column: 1 / -1; }
.pa-result .price { font-size: 2rem; }
.buyer-signal { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.buyer-signal:empty { display: none; }
.buyer-signal .chip { white-space: normal; }
p > .ico-inline { display: inline-block; vertical-align: -3px; width: 15px; height: 15px; }
.tco .table .num { text-align: right; white-space: nowrap; }

/* Compare */
.lcard-cmp { position: absolute; right: 52px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--surface) 90%, transparent); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.lcard-cmp svg { width: 18px; height: 18px; }
.lcard-cmp.on { background: var(--brand); color: var(--brand-ink); }
.cmpbar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160%); z-index: 46; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 8px 8px 8px 18px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); transition: transform .2s; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.cmpbar.show { transform: translate(-50%, 0); }
.cmpbar svg { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }
.cmpbar .btn-ghost { color: var(--bg); }
@media (max-width: 760px) { .cmpbar { bottom: calc(68px + env(safe-area-inset-bottom)); } }
.cmp-wrap { overflow-x: auto; position: relative; } /* contain the absolutely positioned .sr labels inside the scroller */
.cmp { min-width: 640px; }
.cmp th[scope=row] { width: 170px; color: var(--muted); font-size: .82rem; text-transform: none; letter-spacing: 0; }
.cmp thead th { vertical-align: top; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); }
.cmp-car { display: block; color: var(--ink); }
.cmp-media { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; margin-bottom: 8px; background: var(--surface-2); }
.cmp-media > img, .cmp-media > svg { width: 100%; height: 100%; object-fit: cover; }
.cmp td.cmp-best { background: color-mix(in srgb, var(--good) 14%, transparent); font-weight: 700; }
.cmp-eq { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.cmp-eq .no { color: var(--muted); }

/* Notifications */
.iconbtn { position: relative; }
.bell-count { position: absolute; top: 2px; right: 0; margin: 0; min-width: 18px; text-align: center; }
.notif-pop { width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; }
/* Narrow screens: the bell sits mid-bar, so an absolutely placed popover would run off the left edge. Pin it under the top bar
   (56 px tall below 760 px) with 8 px side insets, above the fixed bottom nav. */
@media (max-width: 560px) {
  .notif-pop { position: fixed; left: 8px; right: 8px; top: 62px; width: auto; min-width: 0; max-height: calc(100dvh - 62px - 80px); }
}
/* Signed-in top bar at phone width (375 px): brand + FI|DE|EN + bell + heart + avatar must fit without sideways scroll. */
@media (max-width: 480px) {
  .topbar-in { gap: 8px; }
  .topbar-lang + .topbar-actions { margin-left: 0; }
  .topbar-actions { gap: 0; }
  .topbar-actions .btn-ghost { padding: 6px; }
  .topbar-actions .iconbtn { width: 36px; height: 36px; padding: 0; }
  .brand { font-size: 1.08rem; gap: 6px; }
  .brand-mark { width: 24px; height: 24px; }
  .langsw button { padding: 6px 3px; }
}
.notif-pop a.notif { display: flex; gap: 10px; align-items: flex-start; white-space: normal; line-height: 1.35; }
.notif.new { background: var(--brand-soft); }
.notif-ico { width: 22px; flex: none; text-align: center; font-weight: 800; color: var(--brand); }

.dealer-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.dealer-checks li { display: flex; gap: 8px; align-items: center; }
.dealer-checks svg { width: 16px; height: 16px; }
.dealer-checks .ok { color: var(--good); } .dealer-checks .no { color: var(--bad); }

/* Card: one link + sibling buttons (4.11.) */
.lcard-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.lcard-link:hover { text-decoration: none; }
.lcard-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: -3px; border-radius: var(--r); }
.lcard > .lcard-fav, .lcard > .lcard-cmp { z-index: 2; }

/* print: the condition report on paper / PDF (listing page "Tulosta raportti") */
.print-only { display: none; }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f5f2; --ink: #000; --ink-2: #222; --muted: #555; --line: #ccc; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .footer, .buybar, .buybox, .thumbs, .tabs, .no-print, .skip, #modal-root, .toast, .notif-pop, nav, .gallery, .breadcrumb, .lcard, .ask-ai, .similar, [role=tablist] { display: none !important; }
  .print-only { display: block !important; }
  .print-head { border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
  .print-head h1 { font-size: 20pt; margin: 6px 0 2px; }
  .card { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  .listing-grid, .grid2 { display: block !important; }
  a { color: inherit; text-decoration: none; }
  body.print-report main * { visibility: hidden; }
  body.print-report .print-scope, body.print-report .print-scope * { visibility: visible; }
  body.print-report .print-scope { position: absolute; left: 0; top: 0; width: 100%; }
  @page { margin: 14mm; }
}

/* wanted ads */
.pillar-link { color: inherit; text-decoration: none; transition: border-color .15s; }
.pillar-link:hover, .pillar-link:focus-visible { border-color: var(--brand); }
.wish-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.wish-toggle { margin-top: 8px; }

/* handover code */
.pin-card { border: 2px dashed var(--brand); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 6px; background: var(--surface-2); }
.pin-code { font: 700 2.2rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--text); }
.pin-in { font: 600 1.4rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; max-width: 220px; }

/* wizard photo gallery */
.pgal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pgal-item { margin: 0; position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pgal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.pgal-item figcaption { min-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgal-act { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.pgal-act .btn { padding: 4px 6px; min-height: 0; background: var(--surface); }
.pgal-act svg { width: 16px; height: 16px; }
