/* Brand tokens from the brand guidelines v1.1 */
:root {
  --blue: #1f45d6;
  --blue-dark: #1838ad;
  --ink: #0a1330;
  --paper: #ffffff;
  --mist: #eef1f6;
  --sky: #9db8ff;
  --stone: #6b7385;
  --sun: #ffc53d;
  --leaf: #14a06a; /* completed steps only, never "verified" */
  --danger: #b3261e;
  --line: #d9deea;
  --head: 'Archivo', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/24px var(--body); color: var(--ink); background: var(--paper); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 32px; line-height: 38px; }
h2 { font-size: 22px; line-height: 28px; }
h3 { font-size: 17px; line-height: 24px; }
p { margin: 0 0 16px; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
main { padding: 32px 0 64px; min-height: 60vh; }
.muted { color: var(--stone); }
.small { font-size: 14px; line-height: 20px; }
.caption { font: 600 12px/16px var(--body); color: var(--stone); text-transform: uppercase; letter-spacing: 0.04em; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 15px/16px var(--head); }
.brand img { width: 36px; height: 36px; }
.site-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--blue); }
.site-footer { background: var(--mist); padding: 32px 0; font-size: 14px; line-height: 20px; color: var(--stone); }
.env-banner { background: var(--sun); color: var(--ink); font: 600 12px/16px var(--body); padding: 6px 16px; text-align: center; }
.env-banner a { color: var(--ink); }

/* Buttons and forms */
.btn { display: inline-block; font: 600 15px/20px var(--body); padding: 12px 20px; border: 1px solid var(--blue); background: var(--blue); color: #fff; text-decoration: none; cursor: pointer; border-radius: 2px; }
.btn:hover { background: var(--blue-dark); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: var(--mist); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 20px; }
.field .hint { font-size: 14px; color: var(--stone); margin: -2px 0 6px; font-weight: 400; }
input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='search'], select, textarea {
  width: 100%; font: 400 16px/24px var(--body); color: var(--ink); padding: 10px 12px; border: 1px solid var(--stone); border-radius: 2px; background: #fff;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
textarea { min-height: 180px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 12px; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font: 700 17px/24px var(--head); margin-bottom: 12px; padding: 0; }

/* Messages */
.notice { padding: 14px 16px; background: var(--mist); border-left: 4px solid var(--blue); margin-bottom: 20px; }
.notice.error { border-color: var(--danger); background: #fdecea; }
.notice.warn { border-color: var(--sun); background: #fff8e5; }
.guide { background: var(--mist); padding: 20px; }
.guide h3 { margin-bottom: 6px; }
.guide p:last-child { margin-bottom: 0; }

/* Cards, tables, pills */
.card { border: 1px solid var(--line); padding: 20px; background: #fff; }
.pill { display: inline-block; font: 600 12px/16px var(--body); padding: 4px 8px; background: var(--mist); color: var(--ink); border-radius: 2px; }
.pill.live { background: var(--blue); color: #fff; }
.pill.in_review { background: var(--sun); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px/16px var(--body); color: var(--stone); text-transform: uppercase; letter-spacing: 0.04em; }
.table-scroll { overflow-x: auto; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
dl.facts dt { color: var(--stone); }
dl.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Checklist */
.steps { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.steps li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.steps .mark { flex: none; width: 24px; height: 24px; border: 2px solid var(--stone); border-radius: 50%; margin-top: 2px; }
.steps .done .mark { background: var(--leaf); border-color: var(--leaf); }
.steps .body { flex: 1; }
.steps a { font-weight: 600; }

/* Home and search */
.hero { background: var(--blue); color: #fff; padding: 64px 0; }
.hero h1 { font-size: 48px; line-height: 52px; margin-bottom: 12px; }
.hero p { font-size: 18px; line-height: 28px; max-width: 560px; }
.searchbar { display: flex; gap: 8px; max-width: 560px; margin-top: 24px; }
.searchbar input { border-color: #fff; }
.searchbar .btn { background: var(--ink); border-color: var(--ink); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 24px; }
.filters .field { margin: 0; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.result { text-decoration: none; color: var(--ink); border: 1px solid var(--line); display: block; }
.result:hover { border-color: var(--blue); }
.result .thumb { aspect-ratio: 4 / 3; background: var(--mist); overflow: hidden; }
.result .thumb img { width: 100%; height: 100%; object-fit: cover; }
.result .info { padding: 14px 16px 16px; }
.result .price { font: 700 20px/26px var(--head); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Listing page */
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-bottom: 24px; }
.gallery figure { margin: 0; position: relative; background: var(--mist); overflow: hidden; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery .side { display: grid; gap: 8px; }
.gallery figcaption, .photo-label { position: absolute; left: 8px; bottom: 8px; background: var(--ink); color: #fff; font: 600 12px/16px var(--body); padding: 4px 8px; }
.listing-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.price-xl { font: 700 32px/38px var(--head); }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.photo-strip figure { margin: 0; position: relative; }
.description { white-space: pre-line; }

/* Seller photo manager */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photos .item { border: 1px solid var(--line); }
.photos .item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photos .item .controls { padding: 10px 12px; font-size: 14px; }
.photos .item .check { margin-bottom: 6px; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

@media (max-width: 760px) {
  h1 { font-size: 28px; line-height: 34px; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 36px; line-height: 40px; }
  .grid2, .grid3, .three, .listing-cols, .gallery, .cols2 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .site-nav { margin-left: 0; gap: 14px; padding-bottom: 12px; }
}

/* ===== Design pass: icons, cards, search, listing page, viewer ===== */
.icon { flex: none; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.15s, border-color 0.15s; }
.block-btn { width: 100%; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230A1330' stroke-width='1.75'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 34px; }
.section { margin-top: 56px; }
.section:first-child { margin-top: 8px; }
.section > h2, .section > .spread { margin-bottom: 20px; }
.section > .spread h2 { margin: 0; }
.pill.owner { background: var(--ink); color: #fff; }
.pill.new, .badge.new { background: var(--sun); color: var(--ink); }

/* Feature row */
.features { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 10px 0 0; font-weight: 600; }
.features li { display: inline-flex; align-items: center; gap: 6px; }
.features .icon { color: var(--stone); }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero h1 { font-size: 56px; line-height: 58px; letter-spacing: -0.02em; }
.searchbar { position: relative; max-width: 640px; gap: 0; background: #fff; padding: 6px; border-radius: 2px; box-shadow: 0 8px 28px rgba(10, 19, 48, 0.25); }
.searchbar input { border: 0; padding-left: 44px; font-size: 17px; }
.searchbar input:focus { outline: none; }
.searchbar:focus-within { outline: 3px solid var(--sky); }
.searchbar-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--stone); display: flex; pointer-events: none; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 20px 0 0; font-size: 15px; }
.hero-links a { color: #fff; }
.hero-links span { opacity: 0.75; }
.point .icon, .card > .icon { color: var(--blue); margin-bottom: 8px; }
.howto { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.howto li { border-top: 3px solid var(--ink); padding-top: 16px; }
.howto .num { font: 700 32px/36px var(--head); color: var(--blue); display: block; margin-bottom: 4px; }

/* Result cards */
.results { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.result { transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; background: #fff; }
.result:hover { border-color: var(--ink); box-shadow: 0 10px 28px rgba(10, 19, 48, 0.12); transform: translateY(-2px); }
.result .thumb { position: relative; aspect-ratio: 3 / 2; }
.result .thumb img { transition: transform 0.3s; }
.result:hover .thumb img { transform: scale(1.03); }
.thumb-empty { height: 100%; display: grid; place-items: center; color: var(--stone); }
.badge { position: absolute; display: inline-flex; align-items: center; gap: 5px; font: 600 12px/16px var(--body); padding: 4px 8px; border-radius: 2px; }
.badge.new { left: 10px; top: 10px; }
.badge.count { right: 10px; bottom: 10px; background: rgba(10, 19, 48, 0.82); color: #fff; }
.result .info { padding: 16px 18px 14px; }
.result .price { font-size: 22px; line-height: 28px; }
.result .addr { color: var(--ink); margin-top: 2px; }
.result .by { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--stone); }
.result .seller { font-weight: 600; color: var(--ink); text-align: right; }
.result .seller.owner { color: var(--blue); }

/* Search panel */
.searchpanel { background: var(--mist); padding: 16px; }
.searchpanel-main { position: relative; display: flex; background: #fff; border: 1px solid var(--stone); border-radius: 2px; }
.searchpanel-main:focus-within { outline: 3px solid var(--sky); }
.searchpanel-main input { border: 0; padding-left: 44px; }
.searchpanel-main input:focus { outline: none; }
.searchpanel-main .btn { border-radius: 0; }
.searchpanel-filters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 12px; }
.searchpanel-filters label { margin: 0; }
.searchpanel-filters span { display: block; font: 600 12px/16px var(--body); color: var(--stone); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.searchpanel-filters select { padding: 8px 34px 8px 10px; font-size: 15px; border-color: var(--line); }
.h-results { font-size: 24px; line-height: 30px; margin: 0; }
.h-results .muted { font-weight: 600; }

/* Listing page */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--stone); margin-bottom: 16px; }
.gallery { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: min(56vw, 520px); margin-bottom: 28px; }
.gallery .shot { position: relative; padding: 0; border: 0; background: var(--mist); cursor: zoom-in; overflow: hidden; min-height: 0; }
.gallery .shot:first-child { grid-row: 1 / 3; }
.gallery .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s, filter 0.2s; }
.gallery .shot:hover img { transform: scale(1.02); filter: brightness(0.94); }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n2 { grid-template-columns: 2fr 1fr; }
.gallery.n2 .shot:nth-child(2) { grid-row: 1 / 3; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n4 .shot:nth-child(2) { grid-column: 2 / 4; }
.gallery-all { position: absolute; right: 14px; bottom: 14px; box-shadow: 0 2px 10px rgba(10, 19, 48, 0.25); }
.photo-label { position: absolute; left: 8px; bottom: 8px; background: var(--ink); color: #fff; font: 600 12px/16px var(--body); padding: 4px 8px; }
.listing-cols { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
.listing-head h1 { font-size: 36px; line-height: 42px; margin-bottom: 4px; }
.listing-head .features { font-size: 18px; gap: 8px 24px; margin-top: 14px; }
.block { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.description { font-size: 17px; line-height: 28px; max-width: 68ch; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 24px; margin: 0; }
.detail-grid dt { font: 600 12px/16px var(--body); color: var(--stone); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-grid dd { margin: 2px 0 0; font-weight: 600; }
.checks ul { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 15px; line-height: 22px; }
.checks li .icon { margin-top: 3px; color: var(--blue); }
.checks > div:last-child li .icon { color: var(--stone); }
.checks > div { background: var(--mist); padding: 20px; }
.timeline { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.timeline li { counter-increment: step; position: relative; padding: 0 0 20px 48px; }
.timeline li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--head); background: #fff; }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.timeline h3 { margin-bottom: 2px; }
.timeline p { margin: 0; }
.listing-side { position: sticky; top: 20px; display: grid; gap: 16px; }
.buybox { border-color: var(--ink); box-shadow: 0 10px 28px rgba(10, 19, 48, 0.08); }
.who { display: flex; gap: 14px; align-items: flex-start; }
.who .icon { color: var(--blue); }
.who p { margin: 0; }
.mobile-bar { display: none; }

/* Photo viewer */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 19, 48, 0.97); color: #fff; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: var(--ink); }
.viewer-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-weight: 600; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; gap: 8px; padding: 0 8px 20px; }
.viewer figure { flex: 1; min-width: 0; height: 100%; margin: 0; position: relative; display: grid; place-items: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer figcaption { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: var(--ink); padding: 4px 10px; font: 600 12px/16px var(--body); }
.viewer-btn { background: none; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 2px; flex: none; }
.viewer-btn:hover { background: rgba(255, 255, 255, 0.12); }

@media (max-width: 900px) {
  .listing-cols { grid-template-columns: 1fr; gap: 28px; }
  .listing-side { position: static; }
  .searchpanel-filters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 38px; line-height: 42px; }
  .howto, .detail-grid { grid-template-columns: 1fr 1fr; }
  .howto { grid-template-columns: 1fr; }
  .searchpanel-filters { grid-template-columns: 1fr 1fr; }
  .gallery, .gallery.n2, .gallery.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; }
  .gallery .shot { aspect-ratio: 3 / 2; }
  .gallery .shot:first-child { grid-column: 1 / 3; grid-row: auto; }
  .gallery .shot:nth-child(n + 4) { display: none; }
  .gallery.n2 .shot:nth-child(2), .gallery.n4 .shot:nth-child(2) { grid-row: auto; grid-column: auto; }
  .listing-head h1 { font-size: 28px; line-height: 34px; }
  .viewer-stage [data-prev], .viewer-stage [data-next] { position: absolute; bottom: 16px; z-index: 1; }
  .viewer-stage [data-prev] { left: 16px; }
  .viewer-stage [data-next] { right: 16px; }
  .viewer-stage { position: relative; padding: 0 0 76px; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; justify-content: space-between; align-items: center; gap: 12px; box-shadow: 0 -6px 20px rgba(10, 19, 48, 0.08); }
  .site-footer { padding-bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===== First-impression pass: softer corners, two-colour discipline, hero, header ===== */
:root { --r: 10px; --r-sm: 6px; }
.btn, input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='search'], select, textarea, .viewer-btn { border-radius: var(--r-sm); }
.card, .result, .guide, .notice, .searchpanel, .checks > div, .buybox, .photos .item { border-radius: var(--r); }
.result, .photos .item, .gallery { overflow: hidden; }
.gallery { border-radius: var(--r); }
.pill, .badge, .photo-label { border-radius: 4px; }
.notice { border-left-width: 4px; }
.searchpanel-main { border-radius: var(--r-sm); overflow: hidden; }

/* Ink is the dark, blue the single accent. Yellow is kept for "New" only. */
.env-banner { background: var(--mist); color: var(--stone); }
.env-banner a { color: var(--ink); }
.pill.in_review { background: var(--sky); }
.notice.warn { border-color: var(--ink); background: var(--mist); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* Hero */
.hero { position: relative; background: var(--ink); overflow: hidden; padding: 72px 0 150px; }
.hero .wrap { position: relative; z-index: 1; }
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 200px; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55); }
.hero.has-photo { padding-bottom: 96px; }
.hero h1 { font-size: 64px; line-height: 64px; }
.hero p { max-width: 520px; }
.searchcard { max-width: 640px; margin-top: 28px; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab { display: inline-block; margin: 0; padding: 10px 22px; font: 600 15px/20px var(--body); color: #fff; cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0; opacity: 0.8; }
.tab-input:checked + .tab { background: #fff; color: var(--ink); opacity: 1; }
.tab-input:focus-visible + .tab { outline: 3px solid var(--sky); }
.tabpanel { display: none; }
#tab-buy:checked ~ .tabpanel.buy, #tab-sell:checked ~ .tabpanel.sell { display: block; }
.searchcard .searchbar { margin-top: 0; max-width: none; border-radius: 0 var(--r-sm) var(--r-sm) var(--r-sm); }
.tabpanel.sell { background: #fff; color: var(--ink); padding: 18px 20px; border-radius: 0 var(--r-sm) var(--r-sm) var(--r-sm); box-shadow: 0 8px 28px rgba(10, 19, 48, 0.25); }
.tabpanel.sell .btn.ghost { color: var(--ink); border-color: var(--ink); }
.sell-line { font-size: 17px; margin: 0 0 14px; max-width: none; }

/* Save and alert row */
.savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.savebar-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: 600 14px/20px var(--body); color: var(--ink); text-decoration: none; cursor: pointer; }
.savebar-btn:hover { border-color: var(--ink); }
.savebar-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.saved { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.saved li { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.saved-name { font: 700 17px/24px var(--head); color: var(--ink); }

/* Header: one row on phones, with a menu */
.header-mobile { display: none; margin-left: auto; align-items: center; gap: 16px; }
.header-mobile > a { color: var(--ink); font-weight: 600; text-decoration: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--mist); }
.menu nav { position: absolute; right: 0; top: 52px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(10, 19, 48, 0.18); min-width: 220px; padding: 8px; display: grid; }
.menu nav a, .menu nav .linkish { display: block; padding: 12px 14px; color: var(--ink); text-decoration: none; font-weight: 500; text-align: left; width: 100%; border-radius: var(--r-sm); }
.menu nav a:hover { background: var(--mist); }
.tabbar { display: none; }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-mobile { display: flex; }
  .site-header .wrap { flex-wrap: nowrap; }
  .hero { padding: 40px 0 120px; }
  .hero h1 { font-size: 44px; line-height: 46px; }
  .hero-art { height: 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font: 600 11px/14px var(--body); color: var(--ink); text-decoration: none; padding: 4px; }
  .has-tabbar .site-footer { padding-bottom: 96px; }
  .has-tabbar .mobile-bar { bottom: 58px; }
  .has-tabbar .site-footer:has(~ .mobile-bar), .has-tabbar .site-footer { padding-bottom: 150px; }
}

/* Hero video sits over the still image */
.hero-video { z-index: 0; }
.hero.has-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 19, 48, 0.55), rgba(10, 19, 48, 0.1)); }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
@media (max-width: 760px) { .hero.has-photo { padding-bottom: 56px; } }

/* ===== Language, currency and right-to-left ===== */
.prefs { position: relative; }
.prefs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 600 13px/20px var(--body); color: var(--ink); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.prefs summary::-webkit-details-marker { display: none; }
.prefs[open] summary { border-color: var(--ink); }
.prefs form { position: absolute; inset-inline-end: 0; top: 44px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(10, 19, 48, 0.18); padding: 14px; display: grid; gap: 12px; min-width: 220px; }
.prefs form label { margin: 0; }
.prefs form span { display: block; font: 600 12px/16px var(--body); color: var(--stone); margin-bottom: 4px; }
.prefs form select { padding: 8px 34px 8px 10px; font-size: 15px; }
.approx { font: 600 14px/20px var(--body); color: var(--stone); }
.approx-xl { font: 600 18px/26px var(--body); color: var(--stone); margin-bottom: 4px; }
.overseas { border-inline-start: 4px solid var(--blue); margin-bottom: 20px; }
.overseas p { margin-bottom: 8px; }

/* Chinese and Arabic fall back to system fonts with the right glyphs */
:lang(zh) { --head: 'Archivo', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; --body: 'Manrope', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; }
:lang(ar) { --head: 'Archivo', 'Geeza Pro', 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif; --body: 'Manrope', 'Geeza Pro', 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif; }

/* Right-to-left: grids and flex rows mirror on their own; these are the hand-placed pieces */
[dir='rtl'] h1, [dir='rtl'] h2, [dir='rtl'] h3, [dir='rtl'] .hero h1, [dir='rtl'] .caption, [dir='rtl'] th, [dir='rtl'] .detail-grid dt, [dir='rtl'] .searchpanel-filters span { letter-spacing: 0; }
[dir='rtl'] .site-nav, [dir='rtl'] .header-mobile { margin-left: 0; margin-right: auto; }
[dir='rtl'] th, [dir='rtl'] td { text-align: right; padding: 10px 0 10px 12px; }
[dir='rtl'] .notice { border-left: 0; border-right: 4px solid var(--blue); }
[dir='rtl'] .searchbar-icon { left: auto; right: 18px; }
[dir='rtl'] .searchbar input, [dir='rtl'] .searchpanel-main input { padding-left: 12px; padding-right: 44px; }
[dir='rtl'] select { background-position: left 12px center; padding-right: 10px; padding-left: 34px; }
[dir='rtl'] .badge.new { left: auto; right: 10px; }
[dir='rtl'] .badge.count { right: auto; left: 10px; }
[dir='rtl'] .photo-label { left: auto; right: 8px; }
[dir='rtl'] .gallery-all { right: auto; left: 14px; }
[dir='rtl'] .result .seller { text-align: left; }
[dir='rtl'] .timeline li { padding: 0 48px 20px 0; }
[dir='rtl'] .timeline li::before { left: auto; right: 0; }
[dir='rtl'] .timeline li:not(:last-child)::after { left: auto; right: 14px; }
[dir='rtl'] .hero.has-photo::after { background: linear-gradient(270deg, rgba(10, 19, 48, 0.55), rgba(10, 19, 48, 0.1)); }
[dir='rtl'] .tab, [dir='rtl'] .searchcard .searchbar, [dir='rtl'] .tabpanel.sell { border-radius: var(--r-sm); }
[dir='rtl'] .menu nav { right: auto; left: 0; }
[dir='rtl'] .menu nav a, [dir='rtl'] .menu nav .linkish { text-align: right; }
[dir='rtl'] .icon { transform: none; }
[dir='rtl'] [data-prev] .icon, [dir='rtl'] [data-next] .icon { transform: scaleX(-1); }
/* Prices, addresses and codes keep their left-to-right order inside right-to-left text */
[dir='rtl'] .price, [dir='rtl'] .price-xl, [dir='rtl'] .approx, [dir='rtl'] .approx-xl, [dir='rtl'] .addr, [dir='rtl'] .listing-head h1, [dir='rtl'] .features li { unicode-bidi: plaintext; }
@media (max-width: 760px) { .prefs summary span { display: none; } .prefs summary { padding: 9px; border: 0; } }

/* Buy page: the same hero as the front page, in a shorter band with the filters on top */
.hero.hero-compact, .hero.hero-compact.has-photo { padding: 40px 0 36px; }
.hero-compact h1 { font-size: 40px; line-height: 44px; margin-bottom: 18px; }
.hero-compact .hero-art { height: 120px; opacity: 0.55; }
.hero-compact .searchpanel { background: #fff; color: var(--ink); box-shadow: 0 8px 28px rgba(10, 19, 48, 0.25); }
p.h-results { font: 700 20px/28px var(--head); margin: 0; }
@media (max-width: 760px) { .hero-compact h1 { font-size: 28px; line-height: 34px; } .hero.hero-compact, .hero.hero-compact.has-photo { padding: 24px 0; } }

/* Recently sold */
.sold-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.sold-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sold-addr { font-weight: 600; }
.sold-price { text-align: end; white-space: nowrap; }
.sold-price strong { font: 700 18px/24px var(--head); }
@media (max-width: 760px) { .sold-list { grid-template-columns: 1fr; } }

/* Maps */
.sold-list li { align-items: center; }
.sold-photo { flex: none; width: 120px; height: 84px; object-fit: cover; border-radius: var(--r-sm); background: var(--mist); }
.sold-main { flex: 1; min-width: 0; }
.listing-map { width: 100%; height: 360px; border: 0; border-radius: var(--r); background: var(--mist); display: block; }
@media (max-width: 760px) { .sold-photo { width: 88px; height: 64px; } .listing-map { height: 260px; } }

/* ===== Chat ===== */
.chatcard textarea, .composer textarea { min-height: 0; resize: vertical; }
.chat { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--mist); border-radius: var(--r); max-height: 60vh; min-height: 180px; overflow-y: auto; margin-bottom: 16px; }
.bubble { max-width: 82%; align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; }
.bubble.mine { align-self: flex-end; background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 14px 14px 4px 14px; }
.bubble-who { font: 600 12px/16px var(--body); color: var(--stone); margin-bottom: 4px; }
.bubble.mine .bubble-who { color: rgba(255, 255, 255, 0.8); }
.bubble-body { white-space: pre-line; overflow-wrap: anywhere; }
.bubble-raw { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--stone); }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 24px; }
.composer textarea { flex: 1; }
.chat-tools { border-top: 1px solid var(--line); padding-top: 16px; }
.chat-tools summary { cursor: pointer; color: var(--stone); font-size: 14px; margin-bottom: 16px; }
.inbox { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.inbox li a { display: block; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.inbox li a:hover { background: var(--mist); }
.inbox li.unread strong { color: var(--blue); }
.inbox-preview { margin-top: 4px; color: var(--stone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .pill { margin-inline-start: 8px; }
.tabbar a.has-unread { color: var(--blue); }
[dir='rtl'] .bubble { border-radius: 14px 14px 4px 14px; }
[dir='rtl'] .bubble.mine { border-radius: 14px 14px 14px 4px; }
@media (max-width: 760px) { .tabbar { grid-template-columns: repeat(4, 1fr); } .bubble { max-width: 92%; } }

/* Chat translation */
.bubble form[data-translate] { margin-top: 6px; }
.bubble-translation { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.bubble-translation .small { color: var(--stone); margin-top: 4px; }
.bubble.mine .bubble-translation { border-color: rgba(255, 255, 255, 0.35); }
.bubble.mine .bubble-translation .small { color: rgba(255, 255, 255, 0.8); }

/* ===== Offers ===== */
.offer-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: var(--r); margin: 16px 0; }
.offer-status.accepted { background: var(--blue); }
.offer-status.rejected, .offer-status.withdrawn, .offer-status.lapsed { background: var(--stone); }
.offer-thread { display: grid; gap: 14px; }
.offercard { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: #fff; max-width: 88%; }
.offercard.mine { margin-inline-start: auto; border-color: var(--blue); }
.offercard.pending_coowner { border-style: dashed; border-color: var(--ink); background: var(--mist); }
.offercard-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.offercard-price { font: 700 28px/34px var(--head); margin: 6px 0 10px; }
details.card > summary { cursor: pointer; }
.bubble.is-offer { border-color: var(--ink); border-width: 2px; }
.bubble-offer { display: inline-block; margin-top: 8px; font-weight: 600; }
.bubble.mine .bubble-offer { color: #fff; }
@media (max-width: 760px) { .offercard { max-width: 100%; } }

/* "Offer accepted": the one status that sits on the photo in place of "New" */
.badge.accepted { left: 10px; top: 10px; background: var(--ink); color: #fff; }
[dir='rtl'] .badge.accepted { left: auto; right: 10px; }
.pill.accepted { background: var(--ink); color: #fff; }
.accepted-note { border-inline-start: 3px solid var(--ink); padding-inline-start: 10px; margin: 0; }
.badge.sold, .pill.sold { background: var(--blue); color: #fff; }
.badge.sold { left: 10px; top: 10px; }
[dir='rtl'] .badge.sold { left: auto; right: 10px; }

/* ===== Inspections ===== */
.slots { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.slots li { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.slots li.slot-manage { display: block; }
.slots li.slot-manage p { margin: 10px 0 6px; display: flex; gap: 8px; align-items: center; }
.slots details summary { cursor: pointer; color: var(--stone); }

/* ===== Marketplace pass: header search, trust strip, hearts, chips, numerals ===== */
/* Prices and figures line up in lists and don't shift width as they change */
.price, .price-xl, .approx, .approx-xl, .offercard-price, .sold-price, .features, td, dd { font-variant-numeric: tabular-nums; }

.header-search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px; background: var(--mist); border: 1px solid transparent; border-radius: 999px; padding: 0 14px; color: var(--stone); }
.header-search:focus-within { background: #fff; border-color: var(--ink); }
.header-search input { border: 0; background: none; padding: 8px 0; font-size: 15px; }
.header-search input:focus { outline: none; }

.trust { background: var(--mist); font: 500 13px/18px var(--body); color: var(--ink); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 6px 28px; justify-content: center; padding-top: 8px; padding-bottom: 8px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { color: var(--blue); }

.result-wrap { position: relative; }
.result-wrap .result { height: 100%; }
.fav { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; }
.fav button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink); cursor: pointer; box-shadow: 0 2px 8px rgba(10, 19, 48, 0.2); }
.fav button:hover { background: #fff; }
.fav button.on { color: var(--blue); }
.fav button.on .icon { fill: currentColor; }
.savebtn.on { border-color: var(--blue); color: var(--blue); }
.savebtn.on .icon { fill: currentColor; }
.next-inspection { display: flex; align-items: center; gap: 6px; margin-top: 10px; font: 600 13px/18px var(--body); color: var(--blue); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font: 600 14px/20px var(--body); color: var(--ink); text-decoration: none; background: #fff; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.nearform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.nearform label { margin: 0; font-weight: 400; }
.nearform input { width: 76px; padding: 4px 8px; font-size: 14px; }

@media (max-width: 900px) { .header-search { display: none; } }
@media (max-width: 760px) { .trust .wrap { justify-content: flex-start; gap: 4px 16px; } .trust span:nth-child(n + 2) { display: none; } }
/* Keep the header on one row on desktop now that it carries a search box */
@media (min-width: 901px) {
  .site-header .wrap { flex-wrap: nowrap; gap: 16px; }
  .site-nav { flex: none; flex-wrap: nowrap; gap: 16px; white-space: nowrap; }
  .header-search { flex: 1 1 160px; min-width: 120px; max-width: 300px; }
}
@media (min-width: 761px) and (max-width: 900px) { .site-nav { gap: 14px; font-size: 15px; } }

/* ===== Start a listing: address first ===== */
.lead { font-size: 19px; line-height: 28px; color: var(--stone); }
.startform label { font: 700 20px/26px var(--head); margin-bottom: 10px; }
.startform-row { display: flex; gap: 10px; }
.startform-row input { flex: 1; font-size: 18px; padding: 14px 16px; }
.startform-row .btn { flex: none; }
.startform.waiting input { background: var(--mist); color: var(--stone); }
.startform.waiting [data-wait-status] { color: var(--blue); font-weight: 600; }
.found { background: var(--mist); border-radius: var(--r); padding: 20px; margin-bottom: 28px; }
.found .notice { background: #fff; margin: 0; }
.found ul { margin: 6px 0 0; padding-inline-start: 18px; }
.found h3 { margin: 0; }
@media (max-width: 760px) { .startform-row { flex-direction: column; } }

/* Listing description in the house ad format */
.description { white-space: normal; }
.description p { margin: 0 0 14px; }
.ad-headline { font: 700 22px/28px var(--head); margin: 0 0 12px; }
.ad-features { margin: 4px 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.ad-features li { position: relative; padding-inline-start: 18px; font-size: 16px; line-height: 24px; }
.ad-features li::before { content: ''; position: absolute; inset-inline-start: 0; top: 9px; width: 7px; height: 7px; background: var(--blue); }
.ad-facts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 14px; }
.ad-facts span { background: var(--mist); border-radius: 4px; padding: 4px 10px; font: 600 14px/20px var(--body); }

/* ===== Sales Advice ===== */
.advice-doc { border: 1px solid var(--ink); border-radius: var(--r); padding: 24px; background: #fff; }
.advice-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.advice-head strong { font: 700 22px/28px var(--head); }
.advice-statement { background: var(--mist); border-inline-start: 4px solid var(--blue); padding: 12px 14px; font-size: 14px; line-height: 21px; margin-bottom: 8px; }
.advice-doc section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.advice-doc section h3 { margin-bottom: 10px; }
.advice-signers { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.advice-signers li { display: flex; gap: 12px; align-items: flex-start; }
.advice-signers .mark { flex: none; width: 22px; height: 22px; border: 2px solid var(--stone); border-radius: 50%; margin-top: 2px; }
.advice-signers .done .mark { background: var(--leaf); border-color: var(--leaf); }
.repfinder { background: var(--mist); border-radius: var(--r); padding: 16px; margin-bottom: 20px; }
.repfinder label { font: 700 17px/24px var(--head); }
.repfinder .startform-row input { font-size: 16px; padding: 10px 12px; }
.has-report { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 600 13px/18px var(--body); color: var(--ink); }
.has-report .icon { color: var(--blue); }
.norep { border: 1px solid var(--line, #d9dee5); border-radius: 12px; padding: 14px 16px; margin: 0 0 20px; background: #fff; }
.norep > summary { cursor: pointer; font: 700 15px/22px var(--body); }
.norep[open] > summary { margin-bottom: 8px; }
.norep-list { display: grid; gap: 12px; margin: 12px 0; }
.norep-item { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line, #d9dee5); }
.norep-item p { margin: 2px 0 4px; }
.norep-item form { display: grid; gap: 8px; justify-items: start; }
.norep-done { display: flex; align-items: center; gap: 6px; font-weight: 600; }
@media (max-width: 640px) { .norep-item { grid-template-columns: 1fr; } }

/* Search filters */
.searchpanel-main .filters-open { border: 0; border-left: 1px solid var(--line); border-radius: 0; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.filters-count { background: var(--blue); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; font: 700 12px/22px var(--body); text-align: center; }
.searchpanel-filters { grid-template-columns: repeat(2, minmax(0, 220px)); }
dialog.filterdlg { width: min(720px, calc(100vw - 24px)); height: min(860px, calc(100vh - 24px)); max-height: none; padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 24px 80px rgba(10, 19, 48, 0.35); }
dialog.filterdlg[open] { display: flex; flex-direction: column; }
dialog.filterdlg::backdrop { background: rgba(10, 19, 48, 0.55); }
.filters-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.filters-head h2 { margin: 0; font-size: 20px; }
.filters-close { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }
.filters-body { overflow-y: auto; padding: 0 24px; flex: 1 1 auto; min-height: 0; text-align: left; }
.filters-head, .filters-foot { flex: none; }
.filters-body section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.filters-body section:last-child { border-bottom: 0; }
.filters-body h3 { margin: 0 0 14px; font-size: 17px; }
.filters-body label > span { font-weight: 600; }
.filters-body .check > span { font-weight: 400; }
.filters-body .check { margin-bottom: 0; }
.filters-body .grid2 { margin: 0; }
.filters-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); }
.featgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.featgroup { margin-bottom: 18px; }
.featgroup h4 { margin: 0 0 10px; font: 700 14px/20px var(--body); }
.featgroup .check { margin-bottom: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 12px 28px; }
details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; color: var(--blue); font-weight: 700; margin-bottom: 12px; }
.featlist { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; }
.featlist li::before { content: '✓'; color: var(--blue); font-weight: 700; margin-right: 8px; }
@media (max-width: 640px) { .featgrid { grid-template-columns: 1fr; } .featlist { grid-template-columns: 1fr 1fr; } .searchpanel-main .filters-open { padding: 0 12px; } }

/* Search kinds: Buy, Rent, Sold, Address */
#tab-rent:checked ~ .tabpanel.rent, #tab-sold:checked ~ .tabpanel.sold, #tab-address:checked ~ .tabpanel.address { display: block; }
.tabpanel.rent { background: #fff; color: var(--ink); padding: 18px 20px; border-radius: 0 var(--r-sm) var(--r-sm) var(--r-sm); box-shadow: 0 8px 28px rgba(10, 19, 48, 0.25); }
.tabpanel.rent .btn.ghost { color: var(--ink); border-color: var(--ink); }
.searchbar .filters-open { border: 0; border-left: 1px solid var(--line); border-radius: 0; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; }
.searchtabs { display: flex; gap: 4px; margin: 0 0 -1px; }
.searchtabs a { padding: 10px 22px; font: 700 15px/20px var(--body); text-decoration: none; color: #fff; background: rgba(10, 19, 48, 0.45); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.searchtabs a.on { background: #fff; color: var(--ink); box-shadow: inset 0 -3px 0 var(--blue); }
.hero-compact .searchtabs + .searchpanel { border-top-left-radius: 0; }
.addr-card { margin-bottom: 12px; }
.addr-sales { list-style: none; padding: 0; margin: 12px 0 0; }
.addr-sales li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .searchtabs a { padding: 9px 12px; font-size: 14px; } .searchbar .btn.filters-open { padding: 0 14px; } .searchbar .filters-word { display: none; } }
@media (max-width: 640px) { .searchcard .tab { padding-left: 11px; padding-right: 11px; font-size: 14px; } }

/* Online auctions */
.room { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 20px; }
.room-side { display: grid; gap: 16px; }
.room-figures { display: flex; flex-wrap: wrap; gap: 28px 48px; margin: 20px 0 12px; }
.room-bid { font: 800 34px/40px var(--head, var(--body)); letter-spacing: -0.01em; }
.room-clock { font: 800 34px/40px var(--head, var(--body)); font-variant-numeric: tabular-nums; }
.room-clock.late { color: #b3261e; }
.room-notice { min-height: 22px; font-weight: 600; margin-bottom: 8px; }
.room-notice:empty { display: none; }
.room-status.open { background: #e3f5e9; color: #14532d; }
.room-status.paused, .room-status.closing_review { background: #fdf0d5; color: #7a4b00; }
.room-status.sold { background: var(--ink); color: #fff; }
.room-bidform { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.room-bidrow { display: flex; gap: 10px; }
.room-bidrow input { font: 700 22px/28px var(--body); max-width: 240px; }
.room-result { font-weight: 700; min-height: 22px; margin: 8px 0 0; }
.room-result.accepted { color: #14532d; }
.room-result.rejected { color: #b3261e; }
.js-auction .nojs-only { display: none; }
.room-history, .room-notices { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.room-history li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.room-history li:first-child { border-top: 0; font-weight: 700; }
.room-notices li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.room-notices li:first-child { border-top: 0; }
.console-actions { display: grid; gap: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.console-action { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.console-action input[type='text'] { flex: 1; min-width: 200px; }
.conditions { padding-left: 20px; }
.conditions li { margin-bottom: 8px; }
.auction-block { border: 2px solid var(--blue); border-radius: var(--r); padding: 20px; }
.plainlist { list-style: none; padding: 0; }
.plainlist li { padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .room { grid-template-columns: 1fr; } .room-bid, .room-clock { font-size: 28px; } }
.searchbar .btn.filters-open, .searchbar .btn.filters-open:hover { background: #fff; color: var(--ink); padding: 0 18px; }
.searchbar .btn.filters-open:hover { background: var(--mist); }
/* The suburb suggestions open as you type; the browser's drop-down arrow only crowds the field. */
.searchbar input[list]::-webkit-calendar-picker-indicator, .searchpanel-main input[list]::-webkit-calendar-picker-indicator { display: none !important; }

/* Rentals */
.per-week { font-size: 0.6em; font-weight: 600; color: var(--stone); }
.searchpanel-filters.rentfilters { grid-template-columns: repeat(5, 1fr); }
.rentmore { margin-top: 12px; text-align: left; }
.rentmore > summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.rentmore-body { padding-top: 12px; }
.rentmore-body label > span { font-weight: 600; }
.rentmore-body .check > span { font-weight: 400; }
.rentmore-body .check { margin-bottom: 0; }
.rental-photos { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 180px; gap: 8px; margin: 12px 0 24px; border-radius: var(--r); overflow: hidden; }
.rental-photos a { display: block; overflow: hidden; }
.rental-photos .lead-photo { grid-row: span 2; }
.rental-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rental-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.rental-price { font: 800 30px/36px var(--head, var(--body)); margin: 8px 0; }
.keyfacts { display: flex; gap: 20px; font-weight: 700; }
.keyfacts span { display: inline-flex; align-items: center; gap: 6px; }
.description ul { padding-left: 20px; }
@media (max-width: 760px) { .rental-cols { grid-template-columns: 1fr; } .rental-photos { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; } .rental-photos .lead-photo { grid-column: span 2; } .searchpanel-filters.rentfilters { grid-template-columns: 1fr 1fr; } }

/* List your property: choose to sell or lease */
.listopts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.listopt h2 { margin: 0; font-size: 22px; }
.listopt ul { padding-left: 18px; margin: 0; flex: 1; }
.listopt li { margin-bottom: 6px; }
.listopt .icon { color: var(--blue); }
@media (max-width: 860px) { .listopts { grid-template-columns: 1fr; } }

/* Progress tracker */
.tracker { list-style: none; padding: 0; margin: 24px 0; }
.tracker-stage { display: grid; grid-template-columns: 32px 1fr; gap: 16px; position: relative; padding-bottom: 24px; }
.tracker-stage::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.tracker-stage:last-child::before { display: none; }
.tracker-mark { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--stone); z-index: 1; }
.tracker-stage.done .tracker-mark { background: var(--blue); border-color: var(--blue); color: #fff; }
.tracker-stage.done::before { background: var(--blue); }
.tracker-stage.current .tracker-mark { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 69, 214, 0.15); }
.tracker-stage.info .tracker-mark { border-style: dashed; }
.tracker-body h2 { font-size: 19px; line-height: 26px; margin: 2px 0 6px; }
.tracker-stage.upcoming .tracker-body, .tracker-stage.info .tracker-body { color: var(--stone); }
.tracker-stage.upcoming .tracker-body h2, .tracker-stage.info .tracker-body h2 { color: var(--ink); }
.tracker-stage.current .tracker-body { background: var(--mist); border-radius: var(--r); padding: 12px 16px; }
.tracker-steps { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.tracker-steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.tracker-steps strong { display: inline-flex; align-items: center; gap: 6px; }
.tracker-steps .icon { color: var(--blue); }
.inline-form { display: inline; margin-left: 10px; }
@media print { .site-header, .site-footer, .noprint, .bottom-nav, .devbar { display: none !important; } body { background: #fff; } }

/* Partners */
.stagepartners { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin: 12px 0; color: var(--ink); }
.stagepartners p { margin: 0 0 8px; }
.stagepartners ul { list-style: none; padding: 0; margin: 2px 0 10px; }
.stagepartners li { padding: 3px 0; }
.partnergrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.partnergrid blockquote { margin: 0; padding-left: 10px; border-left: 3px solid var(--line); }
@media (max-width: 900px) { .partnergrid { grid-template-columns: 1fr; } }

.testcode { font-size: 1.25em; letter-spacing: 0.08em; }

.testskip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; padding: 10px 12px; border: 1px dashed var(--stone); border-radius: var(--r-sm); }
.site-nav a.btn, .site-nav a.btn:hover { color: #fff; }

/* Progress while a long search runs */
.progress { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.progress-head strong { font: 700 18px/24px var(--head, var(--body)); }
.progress-track { height: 8px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 999px; background: var(--blue); transition: width 0.5s linear; position: relative; overflow: hidden; }
.progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); animation: progress-shine 1.6s linear infinite; }
@keyframes progress-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-steps { list-style: none; padding: 0; margin: 16px 0 12px; display: grid; gap: 8px; }
.progress-steps li { position: relative; padding-left: 28px; color: var(--stone); }
.progress-steps li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.progress-steps li.done { color: var(--ink); }
.progress-steps li.done::before { content: '✓'; border: 0; background: none; color: var(--blue); font-weight: 700; left: 2px; top: 0; width: auto; height: auto; }
.progress-steps li.current { color: var(--ink); font-weight: 600; }
.progress-steps li.current::before { border-color: var(--blue); animation: progress-pulse 1.2s ease-in-out infinite; }
@keyframes progress-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 69, 214, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(31, 69, 214, 0); } }
@media (prefers-reduced-motion: reduce) { .progress-bar::after, .progress-steps li.current::before { animation: none; } }

/* Self management of rentals */
.pmstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.pmstat { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.pmstat strong { font: 700 22px/28px var(--head); }
.pmstat.bad strong { color: #b42318; }
.pmstat.good strong { color: #17663a; }
.pill.bad { background: #fde8e6; color: #b42318; }
.pill.good { background: #e3f4ea; color: #17663a; }
.pill.warn { background: #fff2cc; color: var(--ink); }
.pmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 16px 0; }
.pmgrid h3 { margin: 0; }
.pmtabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 16px 0 24px; }
.pmtabs a { padding: 10px 14px; text-decoration: none; color: var(--stone); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.pmtabs a.on { color: var(--ink); border-bottom-color: var(--blue); }
.pmchecklist, .pmtasks { list-style: none; padding: 0; margin: 0; }
.pmchecklist li { padding: 6px 0 6px 28px; position: relative; }
.pmchecklist li::before { content: ''; position: absolute; left: 0; top: 9px; width: 16px; height: 16px; border: 2px solid var(--stone); border-radius: 50%; }
.pmchecklist li.done { color: var(--stone); }
.pmchecklist li.done::before { background: #17663a; border-color: #17663a; }
.pmtasks li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pmtasks li.done > span { text-decoration: line-through; color: var(--stone); }
.pmtasks li.late > span { color: #b42318; }
.pmthread { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.pmmsg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 88%; background: #fff; }
.pmmsg p { margin: 0 0 4px; }
.pmmsg.mine { align-self: flex-end; background: #eef2ff; border-color: #cfd8fb; }
.pmmsg.note { background: #fff8e5; border-color: #f1dc9c; border-style: dashed; }
.pmmsg.system, .pmmsg.external { background: var(--mist); max-width: 100%; }
.pmfiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pmfiles img { width: 112px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.pmfile { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--mist); font-size: 14px; }
.pmrepair { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; text-decoration: none; color: var(--ink); margin-bottom: 10px; }
.pmrepair:hover { border-color: var(--blue); }
.pmsteps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0 0; counter-reset: s; }
.pmsteps li { counter-increment: s; font: 600 12px/16px var(--body); padding: 6px 10px; border-radius: 999px; background: var(--mist); color: var(--stone); }
.pmsteps li::before { content: counter(s) '. '; }
.pmsteps li.done { background: #e3f4ea; color: #17663a; }
.pmsteps li.current { background: var(--blue); color: #fff; }
table.pmfacts { width: auto; margin: 12px 0; }
table.pmfacts th { text-align: left; padding-right: 24px; vertical-align: top; white-space: nowrap; }
table.pmrooms input, table.pmrooms select { min-width: 140px; }
details.inline { display: inline-block; }
details.inline[open] { display: block; margin-top: 8px; }
details > summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.pmprint { max-width: 820px; margin: 0 auto; padding: 32px 24px; }
.pmprint table { margin: 12px 0 20px; }
@media print { .noprint { display: none; } .pmprint { padding: 0; } }
@media (max-width: 640px) { .pmmsg { max-width: 100%; } .pmtasks li { flex-wrap: wrap; } }

.site-nav a.navicon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; }
.site-nav a.navicon:hover, .site-nav a.navicon.on { background: var(--mist); color: var(--blue); }
.navicon-count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font: 700 11px/18px var(--body); text-align: center; }

/* Buy search: the same row of drop-downs as Rent, with the rest under More filters */
.searchpanel-filters.buyfilters { grid-template-columns: repeat(6, 1fr); }
.buymore .searchpanel-filters.buyfilters { grid-template-columns: repeat(5, 1fr); margin-top: 0; }
.buymore .filters-body { overflow: visible; padding: 0; }
.buymore .filters-body section { padding: 16px 0; }
.buymore .filters-body section:first-child { margin-top: 12px; border-top: 1px solid var(--line); }
.buymore .radios { display: flex; flex-wrap: wrap; gap: 6px 24px; }
@media (max-width: 900px) { .searchpanel-filters.buyfilters, .buymore .searchpanel-filters.buyfilters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .searchpanel-filters.buyfilters, .buymore .searchpanel-filters.buyfilters { grid-template-columns: 1fr 1fr; } }
@media (min-width: 901px) { .buymore .featgrid { grid-template-columns: repeat(4, 1fr); } }
