/* Atlas — Agorum's warm paper palette, sized for people who don't love computers. */
:root {
  --void: #efe6d9;
  --paper: #fffaf3;
  --paper2: #f5ede1;
  --raised: #e9ddcc;
  --fg: #1c1510;
  --dim: #4d4138;
  --mute: #7a6b5f;
  --line: rgba(70, 45, 20, 0.14);
  --line2: rgba(70, 45, 20, 0.24);
  --brand: #b0106a;
  --brand-dark: #8c0c55;
  --brand-tint: #fbe6f0;
  --mint: #1f9a68;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --shadow: 0 1px 2px rgba(60, 35, 10, 0.06), 0 8px 28px rgba(60, 35, 10, 0.08);
  --top: 68px;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; background: var(--paper); color: var(--fg); font: 1rem/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
[hidden] { display: none !important; }
svg.ic, .ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
symbol { overflow: visible; }

/* ---------- header ---------- */
.top { height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255, 250, 243, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; }
.mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.word { font-family: var(--serif); font-size: 1.9rem; line-height: 1; letter-spacing: -0.01em; }
.tagline { color: var(--mute); font-size: 0.9rem; padding-left: 16px; border-left: 1px solid var(--line); }
.nav { margin-left: auto; display: flex; gap: 6px; }
.navbtn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; color: var(--dim); }
.navbtn:hover { background: var(--paper2); }
.navbtn.on { background: var(--fg); color: var(--paper); }
.navbtn.quiet { color: var(--mute); font-weight: 500; }

/* ---------- shared bits ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: none; border-radius: 12px; padding: 0 24px; height: 52px; font-weight: 700; font-size: 1.05rem; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.big { height: 58px; font-size: 1.15rem; width: 100%; }
.ghost { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; }
.ghost:hover { border-color: var(--brand); color: var(--brand); }
.linkbtn { background: none; border: none; color: var(--brand); cursor: pointer; font-weight: 600; padding: 6px 0; }
.linkbtn:hover { text-decoration: underline; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.switch { display: flex; background: var(--paper2); border-radius: 12px; padding: 4px; gap: 4px; }
.switch button { flex: 1; background: none; border: none; border-radius: 9px; padding: 11px 14px; font-weight: 600; cursor: pointer; color: var(--mute); }
.switch button.on { background: #fff; color: var(--fg); box-shadow: 0 1px 3px rgba(70, 45, 20, 0.16); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
input, textarea, select { width: 100%; background: #fff; border: 1.5px solid var(--line2); border-radius: 12px; padding: 13px 15px; font-size: 1.05rem; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.code { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; }
.msg { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fde7ef; color: #7d0a49; font-weight: 500; font-size: 0.95rem; }
.msg.ok { background: #dff5ea; color: #145c3e; }
.fine { color: var(--mute); font-size: 0.85rem; text-align: center; margin: 14px 0 0; }
.fine.left { text-align: left; }
.hint { color: var(--dim); margin: 0; }
.formtitle { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 0; }

/* ---------- sign-in ---------- */
.auth { min-height: calc(100vh - var(--top)); background:
  linear-gradient(90deg, rgba(255, 250, 243, 0.97) 0%, rgba(255, 250, 243, 0.93) 45%, rgba(255, 250, 243, 0.55) 100%),
  url(hero.jpg) center / cover; }
.auth-hero { max-width: 1180px; margin: 0 auto; padding: 64px 28px; display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--brand); margin: 0 0 14px; }
.auth-copy h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5.2vw, 4.2rem); line-height: 1.02; margin: 0 0 20px; letter-spacing: -0.015em; }
.auth-copy h1 em { color: var(--brand); }
.lead { font-size: 1.18rem; color: var(--dim); margin: 0 0 22px; max-width: 34em; }
.lead q { font-style: italic; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; color: var(--dim); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.auth-card { padding: 28px; display: grid; gap: 20px; }

/* ---------- home hero ---------- */
.hero { position: relative; min-height: 460px; display: grid; align-items: center; padding: 64px 28px 72px;
  background: linear-gradient(180deg, rgba(20, 12, 8, 0.55), rgba(20, 12, 8, 0.65)), url(hero.jpg) center / cover; color: #fff; }
.hero-inner { max-width: 880px; width: 100%; margin: 0 auto; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; margin: 0 0 24px; text-align: center; letter-spacing: -0.01em; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); }
.credit { position: absolute; right: 12px; bottom: 8px; margin: 0; font-size: 0.7rem; color: rgba(255, 255, 255, 0.7); }

.searchbar { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 18px; padding: 8px 8px 8px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); color: var(--fg); }
.searchbar .lead-ic { color: var(--mute); width: 22px; height: 22px; }
.searchbar input { border: none; box-shadow: none; padding: 14px 6px; font-size: 1.2rem; background: transparent; min-width: 0; flex: 1; }
.searchbar input:focus { box-shadow: none; }
.searchbar .btn { height: 56px; padding: 0 28px; font-size: 1.1rem; }
.searchbar.small { box-shadow: none; border: 1.5px solid var(--line2); border-radius: 14px; padding: 5px 5px 5px 14px; }
.searchbar.small input { font-size: 1.05rem; padding: 10px 4px; }
.searchbar.small .btn { height: 46px; padding: 0 20px; font-size: 1rem; }
.searchbar.small:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.micbtn { width: 52px; height: 52px; border-radius: 12px; border: none; background: var(--paper2); color: var(--fg); display: grid; place-items: center; cursor: pointer; flex: none; }
.searchbar.small .micbtn { width: 46px; height: 46px; }
.micbtn .ic { width: 22px; height: 22px; }
.micbtn:hover { background: var(--raised); }
.micbtn.live { background: var(--brand); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(176, 16, 106, 0.22); } }
.listening { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; margin: 14px 0 0; }
.listening .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5aa5; animation: pulse 1.2s infinite; }

.where { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.where > span, .wherelbl { font-weight: 600; }
.wherelbl { display: flex; align-items: center; gap: 8px; color: #fff; }
.hero #citySel { min-width: 230px; }
.citychips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cchip { border: 1px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); }
.cchip:hover { background: rgba(255, 255, 255, 0.24); }
.cchip.on { background: #fff; color: var(--fg); border-color: #fff; }

/* ---------- home sections ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 44px 28px 80px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: 2rem; margin: 0 0 18px; }
.wrap .section-title + .citycards, .wrap .section-title + .types { margin-bottom: 44px; }
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.type { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 20px; background: var(--paper2); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.type svg { width: 30px; height: 30px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.type b { font-size: 1.15rem; }
.type span { color: var(--mute); font-size: 0.92rem; }
.type:hover { background: #fff; border-color: var(--line2); transform: translateY(-2px); box-shadow: var(--shadow); }
.citycards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.citycard { text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.citycard b { font-size: 1.05rem; }
.citycard span { color: var(--mute); font-size: 0.9rem; }
.citycard:hover { border-color: var(--brand); }

/* ---------- results ---------- */
.rhead { background: var(--paper2); border-bottom: 1px solid var(--line); }
.rhead-inner { max-width: 1440px; margin: 0 auto; padding: 18px 28px 16px; display: grid; gap: 10px; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--brand); font-weight: 700; cursor: pointer; padding: 4px 0; }
.said { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--dim); }
.said::before { content: "“"; } .said::after { content: "”"; }
#foundTitle { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; line-height: 1.1; }
#foundTitle b { color: var(--brand); font-weight: 400; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line2); border-radius: 999px; padding: 5px 5px 5px 13px; font-size: 0.9rem; font-weight: 600; }
.pill button { display: grid; place-items: center; background: var(--paper2); border: none; border-radius: 999px; width: 24px; height: 24px; cursor: pointer; color: var(--mute); }
.pill button .ic { width: 14px; height: 14px; }
.pill button:hover { background: var(--brand); color: #fff; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sortlbl { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sortlbl select { width: auto; padding: 8px 12px; font-size: 0.95rem; border-radius: 10px; }
.seg { display: flex; background: #fff; border: 1px solid var(--line2); border-radius: 12px; padding: 3px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; border-radius: 9px; padding: 8px 16px; font-weight: 600; cursor: pointer; color: var(--mute); }
.seg button.on { background: var(--fg); color: var(--paper); }
.mobile-only { display: none; }

.split { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.list { list-style: none; padding: 20px 20px 60px 28px; margin: 0; display: grid; gap: 14px; align-content: start; }
.mapcol { position: sticky; top: var(--top); height: calc(100vh - var(--top)); padding: 20px 28px 20px 8px; }
#map { height: 100%; border-radius: 18px; border: 1px solid var(--line); background: #e8e0d4; }
.leaflet-container { font: 14px var(--sans); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-control-layers { border-radius: 10px !important; border: 1px solid var(--line2) !important; box-shadow: var(--shadow) !important; font-size: 13px; }

.prop { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.prop:hover, .prop.hot { border-color: var(--line2); box-shadow: var(--shadow); }
.prop.open { border-color: var(--brand); }
.prop-main { display: grid; grid-template-columns: 210px 1fr; }
.thumb { position: relative; background: #d9d1c4 center / cover; min-height: 170px; cursor: pointer; }
.thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; background: var(--brand); box-shadow: 0 0 0 4px rgba(176, 16, 106, 0.35), 0 2px 8px rgba(0,0,0,0.4); }
.thumb .badge { position: absolute; left: 10px; top: 10px; background: rgba(28, 21, 16, 0.78); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; backdrop-filter: blur(4px); }
.thumb .badge .ic { width: 13px; height: 13px; }
.prop-body { padding: 16px 18px 14px; display: grid; gap: 8px; min-width: 0; }
.prop-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.price { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.price small { font-family: var(--sans); font-size: 0.72rem; color: var(--mute); display: block; margin-top: 3px; letter-spacing: 0.02em; }
.prop h3 { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.loc { color: var(--mute); font-size: 0.92rem; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.facts li { display: inline-flex; align-items: center; gap: 6px; background: var(--paper2); border-radius: 8px; padding: 4px 10px; font-size: 0.88rem; color: var(--dim); }
.facts li .ic { width: 15px; height: 15px; color: var(--mute); }
.facts li.power { background: #e7f4ee; color: #145c3e; }
.facts li.power .ic { color: var(--mint); }
.prop-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.act { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 13px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--fg); font-size: 0.92rem; }
.act .ic { width: 16px; height: 16px; }
.act:hover { border-color: var(--brand); color: var(--brand); }
.act.saved { background: #fff6d6; border-color: #e3bd3c; color: #6b4e00; }
.act.saved .ic { fill: #e3bd3c; stroke: #b48d10; }
.more { border-top: 1px solid var(--line); padding: 18px; background: var(--paper); }
.more dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 20px; margin: 0 0 16px; font-size: 0.97rem; }
.more dt { color: var(--mute); }
.more dd { margin: 0; }
.minimap { height: 280px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; }
.more textarea { font-size: 1rem; min-height: 72px; resize: vertical; }
.notelbl { display: grid; gap: 6px; font-weight: 700; }
.disclaim { color: var(--mute); font-size: 0.82rem; margin: 12px 0 0; }
.empty { text-align: center; padding: 48px 20px; background: var(--paper2); border-radius: 18px; color: var(--dim); font-size: 1.05rem; }

.pinlabel { background: var(--fg); color: #fff; font: 700 12px var(--sans); padding: 3px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.3); border: 2px solid #fff; transform: translate(-50%, -50%); display: inline-block; }
.pinlabel.hot { background: var(--brand); z-index: 1000; transform: translate(-50%, -50%) scale(1.15); }

.busy { position: fixed; inset: 0; background: rgba(255, 250, 243, 0.78); display: grid; place-content: center; justify-items: center; z-index: 3000; backdrop-filter: blur(3px); }
.busy p { font-family: var(--serif); font-size: 1.9rem; margin: 16px 0 0; }
.spinner { width: 54px; height: 54px; border: 5px solid var(--raised); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--fg); color: var(--paper); padding: 14px 20px; border-radius: 14px; font-weight: 600; z-index: 3000; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .types { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .auth-hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; }
  .split { grid-template-columns: 1fr; }
  .mapcol { position: static; height: 62vh; padding: 12px 16px; display: none; }
  .split.showmap .mapcol { display: block; }
  .split.showmap .list { display: none; }
  .list { padding: 14px 16px 60px; }
  .mobile-only { display: flex; }
}
@media (max-width: 640px) {
  :root { --top: 58px; }
  html { font-size: 16px; }
  .top { padding: 0 14px; gap: 10px; }
  .tagline { display: none; }
  .word { font-size: 1.6rem; }
  .mark { width: 30px; height: 30px; }
  .navbtn { padding: 8px 11px; }
  .navbtn.quiet span { display: none; }
  .hero { padding: 36px 14px 44px; min-height: 0; background-image: linear-gradient(180deg, rgba(20,12,8,0.55), rgba(20,12,8,0.65)), url(hero-sm.jpg); }
  .hero h1 { font-size: 2.3rem; }
  .searchbar { flex-wrap: wrap; padding: 8px; }
  .searchbar .lead-ic { display: none; }
  .searchbar input { flex-basis: 100%; padding: 12px 10px; font-size: 1.1rem; }
  .searchbar .btn { flex: 1; }
  .searchbar.small { flex-wrap: nowrap; }
  .searchbar.small input { flex-basis: auto; }
  .searchbar.small .btn { flex: none; padding: 0 14px; }
  .wrap { padding: 30px 16px 60px; }
  .section-title { font-size: 1.6rem; }
  .type { padding: 16px; }
  .type span { display: none; }
  .rhead-inner { padding: 14px 16px; }
  .prop-main { grid-template-columns: 1fr; }
  .thumb { min-height: 170px; }
  .more dl { grid-template-columns: 1fr; gap: 0; }
  .more dd { margin-bottom: 10px; }
  .auth-card { padding: 20px; }
  .credit { display: none; }
}

/* ---------- for sale / for lease ---------- */
:root { --sale: #1f7a4d; --lease: #1d5fa8; }
.dealswitch { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; max-width: 720px; margin: 0 auto 18px; }
.dealswitch button { display: grid; gap: 2px; text-align: center; padding: 12px 10px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.35); background: rgba(20,12,8,0.35); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.dealswitch button b { font-size: 1.25rem; }
.dealswitch button span { font-size: 0.85rem; opacity: 0.85; }
.dealswitch button i { font-style: normal; font-weight: 700; }
.dealswitch button:hover { border-color: #fff; }
.dealswitch button.on { background: #fff; color: var(--fg); border-color: #fff; }
.dealswitch button.on[data-deal="sale"] b { color: var(--sale); }
.dealswitch button.on[data-deal="lease"] b { color: var(--lease); }
.dealtag { display: inline-block; font: 800 0.72rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; padding: 4px 9px; border-radius: 6px; background: var(--sale); }
.dealtag.lease { background: var(--lease); }
.thumb .dealtag { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.price.listed { color: var(--sale); }
.prop:has(.dealtag.lease) .price.listed { color: var(--lease); }
.ltitle { color: var(--mute); font-size: 0.92rem; margin: -2px 0 4px; }
.pinlabel.sale { background: var(--sale); }
.pinlabel.lease { background: var(--lease); }
.pinlabel.sale.hot, .pinlabel.lease.hot { background: var(--brand); }
.listing { border: 2px solid var(--sale); border-radius: 14px; padding: 14px 16px; margin: 12px 0; background: #f2faf5; }
.listing.lease { border-color: var(--lease); background: #f0f5fc; }
.listing p { margin: 6px 0; }
.lhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.15rem; }
.lstatus { font-size: 0.85rem; color: var(--mute); }
.ldesc { white-space: pre-line; }
.lwho { font-size: 0.85rem; color: var(--mute); }
.act.post { border-color: var(--sale); color: var(--sale); font-weight: 700; }
.postform { border: 2px dashed var(--line2); border-radius: 14px; padding: 16px; margin-top: 14px; background: #fff; }
.postform h4 { margin: 0 0 12px; font-size: 1.1rem; }
.postform h4 span { font-weight: 400; color: var(--mute); font-size: 0.9rem; }
.dealpick { display: inline-flex; margin-bottom: 12px; }
.dealpick button { font-size: 1rem; padding: 10px 22px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.pf-grid label { display: grid; gap: 5px; font-weight: 600; font-size: 0.9rem; }
.pf-grid .wide { grid-column: 1 / -1; }
.pf-grid textarea { min-height: 80px; }
@media (max-width: 640px) {
  .dealswitch { gap: 6px; }
  .dealswitch button { padding: 10px 4px; }
  .dealswitch button span { font-size: 0.72rem; }
  .pf-grid { grid-template-columns: 1fr; }
}
.lphoto { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin: 10px 0; }
.citycard .listed { color: var(--sale); font-weight: 700; }
.explain { color: var(--mute); max-width: 860px; margin: -6px 0 18px; line-height: 1.5; }
.explain b { color: var(--fg); } .explain b.g { color: var(--sale); }
.brokersel { width: auto; min-width: 210px; padding: 9px 12px; font-size: 1rem; border-radius: 999px; }
.hero .brokersel { background: rgba(255,255,255,0.95); color: var(--fg); border-color: rgba(255,255,255,0.6); }
.citycard .listed.none { color: var(--mute); font-weight: 500; }

/* ---------- deals ---------- */
.dwrap { max-width: 1500px; margin: 0 auto; padding: 32px 28px 80px; }
.dhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dhead .section-title { margin: 0; }
.dprivate { margin: 4px 0 0; }
.dhead-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dhead-actions .btn { height: 46px; }
.dstats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.dstat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.dstat b { font-size: 1.6rem; line-height: 1.15; }
.dstat span { font-weight: 600; color: var(--dim); }
.dstat small { color: var(--mute); font-size: 0.85rem; }
.dstat.warn { border-color: #e3a13c; background: #fff7e8; }
.dstat.warn b { color: #a15c00; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(188px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.dcol { background: var(--paper2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 160px; transition: background 0.15s; }
.dcol.over { background: var(--brand-tint); border-color: var(--brand); }
.dcol.won { background: #eaf6ef; }
.dcol.lost { background: #f1ede8; opacity: 0.85; }
.dcol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: 4px 6px 10px; }
.dcol-head em { font-style: normal; color: var(--mute); font-weight: 600; background: #fff; border-radius: 999px; padding: 0 9px; font-size: 0.85rem; }
.dcol-body { display: grid; gap: 8px; }
.dcol-empty { color: var(--mute); font-size: 0.88rem; text-align: center; border: 1.5px dashed var(--line2); border-radius: 12px; padding: 18px 8px; margin: 0; }
.dcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; display: grid; gap: 4px; box-shadow: 0 1px 2px rgba(60, 35, 10, 0.06); }
.dcard:hover, .dcard:focus { border-color: var(--brand); outline: none; }
.dcard.dragging { opacity: 0.45; }
.dcard > b { line-height: 1.3; }
.dmeta { color: var(--mute); font-size: 0.88rem; }
.damt { font-weight: 700; color: var(--brand); }
.damt span { color: var(--mute); font-weight: 500; }
.wait { justify-self: start; font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.wait.you { background: #fff1d6; color: #8a5a00; }
.wait.you.late { background: #fde0e0; color: #a01818; }
.wait.them { background: #e6eef9; color: #23508f; }
.dnext { font-size: 0.86rem; color: var(--dim); }
.dnext.late { color: #a01818; font-weight: 600; }
.dlist { display: grid; gap: 8px; }

.dempty { background: #fff; border: 1.5px dashed var(--line2); border-radius: 18px; padding: 34px 28px; max-width: 640px; }
.dempty h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; }
.dempty p { color: var(--dim); }

.dtable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dtable th, .dtable td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dtable th { font-size: 0.85rem; color: var(--mute); background: var(--paper2); }
.dtable tbody tr { cursor: pointer; }
.dtable tbody tr:hover, .dtable tbody tr:focus { background: var(--brand-tint); outline: none; }

/* side panel */
body.noscroll { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 2000; }
.drawer-bg { position: absolute; inset: 0; background: rgba(28, 21, 16, 0.38); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--paper); overflow-y: auto; padding: 26px 26px 60px; box-shadow: -12px 0 40px rgba(28, 21, 16, 0.22); }
.drawer-x { position: absolute; top: 14px; right: 14px; background: #fff; border: 1px solid var(--line2); border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.dtitle { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; margin: 0 48px 4px 0; line-height: 1.15; }
.dsub { margin: 26px 0 10px; font-size: 1.05rem; }
.soft { color: var(--mute); font-weight: 400; }
.soft .ic { vertical-align: -3px; }
.dform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 12px; }
.dform label, .logform label { display: grid; gap: 5px; font-weight: 600; font-size: 0.92rem; }
.dform .wide, .logform .wide { grid-column: 1 / -1; }
.dform input, .dform select, .dform textarea, .logform input, .logform textarea { padding: 10px 12px; font-size: 1rem; }
.act.danger { color: #a01818; }
.act.danger:hover { border-color: #a01818; color: #a01818; }
.logbox { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-top: 16px; }
.logq { margin: 0 0 10px; font-weight: 700; }
.logbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.logbtns .act.on { background: var(--fg); color: var(--paper); border-color: var(--fg); }
.logform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 14px; }
.logform .chk { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; font-weight: 600; }
.logform .chk input { width: 20px; height: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ev { display: grid; grid-template-columns: 34px 1fr 30px; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ev-ic { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--paper2); color: var(--dim); }
.ev.in .ev-ic { background: #e6eef9; color: #23508f; }
.ev.out .ev-ic { background: var(--brand-tint); color: var(--brand); }
.ev.stage .ev-ic { background: #eaf6ef; color: var(--mint); }
.ev-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ev-top time { color: var(--mute); font-size: 0.86rem; }
.ev-resp { font-size: 0.85rem; font-weight: 700; color: var(--mint); }
.ev-body p { margin: 4px 0 0; color: var(--dim); white-space: pre-wrap; }
.ev-del { background: none; border: none; color: var(--mute); cursor: pointer; padding: 4px; border-radius: 8px; }
.ev-del:hover { color: #a01818; background: var(--paper2); }

@media (max-width: 1100px) { .dstats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .dwrap { padding: 22px 16px 60px; }
  .dstats { grid-template-columns: repeat(2, 1fr); }
  .board { grid-auto-columns: 82%; scroll-snap-type: x mandatory; }
  .dcol { scroll-snap-align: start; }
  .drawer-panel { padding: 20px 16px 50px; }
  .dform, .logform { grid-template-columns: 1fr; }
  .dtable th:nth-child(4), .dtable td:nth-child(4) { display: none; }
}
@media (max-width: 520px) {
  .navbtn { padding: 8px 9px; font-size: 0.9rem; gap: 5px; }
  .nav { gap: 2px; }
}

/* ---------- market ---------- */
.mfilters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 18px; }
.mfilters label { display: grid; gap: 5px; font-weight: 600; font-size: 0.9rem; }
.mfilters select { padding: 9px 12px; font-size: 1rem; min-width: 190px; }
.mgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.mcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.mcard.wide { grid-column: 1 / -1; }
.mcard h3 { margin: 0; font-size: 1.1rem; }
.mhint { color: var(--mute); font-size: 0.86rem; margin: 4px 0 12px; }
.mscroll { overflow-x: auto; }
.mtable { border-radius: 12px; font-size: 0.93rem; box-shadow: none; }
.mtable th { cursor: pointer; white-space: nowrap; user-select: none; }
.mtable th.asc::after { content: " ▲"; font-size: 0.7em; }
.mtable th.desc::after { content: " ▼"; font-size: 0.7em; }
.mtable td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mtable td:first-child { white-space: normal; min-width: 160px; }
.mtable th.roll, .mtable td.roll { background: rgba(245, 237, 225, 0.5); }
.mtable tbody tr:not([data-drill]) { cursor: default; }
.mbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mbars li { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; font-size: 0.92rem; }
.mb-l { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-track { height: 14px; display: block; }
.mb-bar { display: block; height: 14px; background: var(--brand); border-radius: 0 4px 4px 0; }
.mbars li:hover .mb-bar { background: var(--brand-dark); }
.mb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.spark { margin: 0 0 10px; }
.spark figcaption { font-size: 0.9rem; color: var(--dim); }
.spark figcaption b { color: var(--fg); margin-left: 6px; }
.spark svg { width: 100%; height: 90px; display: block; }
@media (max-width: 860px) { .mgrid { grid-template-columns: 1fr; } .mbars li { grid-template-columns: 100px 1fr 40px; } }

/* agents scorecard + log form extras */
.dsection-title { margin: 22px 0 10px; font-size: 1.1rem; }
.who { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.who .seg button { padding: 7px 14px; }
.tries { font-weight: 700; }
.tries.bad { color: #a01818; }

.mmore { margin-top: 10px; }
/* phones: icon-only nav so the header fits */
@media (max-width: 760px) {
  .navbtn { font-size: 0; gap: 0; padding: 9px 11px; }
  .navbtn .ic { width: 22px; height: 22px; }
  .word { display: none; }
  .dhead-actions { width: 100%; justify-content: space-between; }
}

.word-cre { font-family: var(--sans); font-weight: 700; font-size: 0.55em; letter-spacing: 0.08em; color: var(--brand); vertical-align: 0.35em; margin-left: 2px; }

.dstats.mini { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.dstats.mini .dstat { box-shadow: none; background: var(--paper); padding: 12px 14px; }
.dstats.mini .dstat b { font-size: 1.35rem; }
.mempty { color: var(--dim); background: var(--paper); border: 1.5px dashed var(--line2); border-radius: 12px; padding: 16px 18px; margin: 0; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
fieldset.closing { border: 1.5px solid var(--line2); border-radius: 14px; padding: 12px 14px 14px; margin: 4px 0 0; background: #fff; }
fieldset.closing legend { font-weight: 700; padding: 0 6px; }
.dform.inner { margin-top: 6px; }
.dform .chk { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dform .chk input { width: 20px; height: 20px; flex: none; }

/* ---------- chart kit ---------- */
:root { --chart-surface: #fff; }
.ctip { position: fixed; z-index: 4000; pointer-events: none; background: var(--fg); color: var(--paper); padding: 8px 11px; border-radius: 10px; font-size: 0.85rem; line-height: 1.35; max-width: 280px; box-shadow: var(--shadow); }
.ctip small { opacity: 0.8; }
.cdonut { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 16px; align-items: center; }
.cdonut svg { width: 100%; height: auto; }
.cdonut path { cursor: default; transition: opacity 0.12s; }
.cdonut svg:hover path { opacity: 0.55; }
.cdonut svg:hover path:hover { opacity: 1; }
.c-big { font-size: 22px; font-weight: 700; fill: var(--fg); }
.c-sub { font-size: 11px; fill: var(--mute); }
.clegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.clegend li { display: grid; grid-template-columns: 12px 1fr auto 42px; gap: 8px; align-items: center; }
.clegend i { width: 12px; height: 12px; border-radius: 3px; }
.clegend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.clegend em { font-style: normal; color: var(--mute); text-align: right; font-variant-numeric: tabular-nums; }
.ckey { font-size: 0.82rem; color: var(--mute); margin: 10px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ckey i { width: 18px; height: 10px; border-radius: 3px; background: var(--dim); display: inline-block; }
.ckey i.tint { opacity: 0.4; margin-left: 8px; }
.cranges { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.cranges li { display: grid; grid-template-columns: 150px 1fr 110px; gap: 10px; align-items: center; font-size: 0.92rem; }
.cr-l { display: flex; align-items: center; gap: 7px; color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cr-l i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cr-t { position: relative; height: 18px; background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.cr-band { position: absolute; top: 5px; height: 8px; border-radius: 4px; opacity: 0.35; }
.cr-dot { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 3px solid; box-sizing: border-box; }
.cr-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-v small { color: var(--mute); font-weight: 400; }
.cr-band.demo, .cr-dot.demo { position: static; display: inline-block; margin: 0 2px 0 6px; }
.cr-band.demo { width: 22px; height: 8px; background: var(--dim); }
.cr-dot.demo { width: 12px; height: 12px; border-color: var(--dim); }
.ccols-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.ccols { margin: 0; }
.ccols figcaption { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.cc-plot { display: flex; align-items: flex-end; gap: 6px; height: 170px; border-bottom: 1px solid var(--line2); padding-top: 18px; }
.cc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; min-width: 0; }
.cc-bar { width: 72%; max-width: 46px; border-radius: 4px 4px 0 0; min-height: 2px; }
.cc-col:hover .cc-bar { filter: brightness(0.85); }
.cc-v { font-size: 0.78rem; font-weight: 600; color: var(--dim); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.cc-l { position: absolute; bottom: -22px; font-size: 0.74rem; color: var(--mute); white-space: nowrap; }
.ccols { padding-bottom: 26px; }
@media (max-width: 640px) {
  .cdonut { grid-template-columns: 1fr; }
  .cdonut svg { max-width: 220px; margin: 0 auto; }
  .cranges li { grid-template-columns: 100px 1fr 86px; }
  .cc-l { font-size: 0.62rem; }
}

/* internet */
.facts li.fibre { color: #1d4f91; font-weight: 600; }
.netbox { background: #f3f7fd; border: 1px solid #d3e2f5; border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.netbox h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 7px; font-size: 1rem; flex-wrap: wrap; }
.netbox h4 span { font-weight: 400; color: var(--mute); font-size: 0.85rem; }
.netbox ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 5px; }
.netbox li { display: flex; gap: 8px; align-items: baseline; }
.netbox p { margin: 4px 0; }
.nt { display: inline-block; min-width: 108px; font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 1px 10px; background: #dbe7f7; color: #23508f; }
.nt.fibre { background: #1d4f91; color: #fff; }

/* ---------- projects ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pcard { display: grid; align-content: start; gap: 6px; text-align: left; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; font: inherit; color: var(--fg); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pcard:hover { border-color: var(--line2); box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard.empty { cursor: default; background: var(--paper2); border-style: dashed; }
.pcard.empty:hover { transform: none; box-shadow: none; }
.pcard.starred { background: var(--paper2); }
.pcard h3 { margin: 0; font-size: 1.12rem; }
.pcard .pic { color: var(--brand); }
.pcard .pic .ic { width: 22px; height: 22px; }
.pnote { margin: 0; color: var(--fg); font-size: .93rem; }
.pmeta { margin: 0; color: var(--mute); font-size: .88rem; }
.pdetail { display: grid; gap: 22px; max-width: 900px; }
.pactions { display: flex; gap: 10px; flex-wrap: wrap; }
.ghost.danger:hover { border-color: #c0392b; color: #c0392b; }
.pdetail .notelbl span { font-weight: 400; color: var(--mute); }
.pdetail textarea { min-height: 90px; }
.psec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.1rem; }
.psec h3 > span { background: var(--paper2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: .85rem; color: var(--mute); }
.psec h3 .btn { margin-left: auto; }
.btn.small { height: 38px; padding: 0 14px; font-size: .93rem; border-radius: 10px; }
.psearches, .pprops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.psearches li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ps-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.ps-q { color: var(--fg); font-size: .93rem; overflow-wrap: anywhere; }
.ps-meta { color: var(--mute); font-size: .86rem; }
.ps-act { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pprops li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pprops li span { display: grid; }
.pprops small { color: var(--mute); }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line2); background: #fff; border-radius: 10px; cursor: pointer; color: var(--mute); }
.iconbtn:hover { color: var(--brand); border-color: var(--brand); }
.pdlg { border: none; border-radius: 20px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(40, 25, 10, .3); background: var(--paper); color: var(--fg); }
.pdlg::backdrop { background: rgba(30, 20, 10, .45); }
.pdlg form { display: grid; gap: 14px; padding: 22px; }
.pdlg h3 { margin: 0; }
.pdlg label { display: grid; gap: 6px; font-weight: 700; }
.pdlg label[hidden] { display: none; }
.pd-actions { display: flex; justify-content: flex-end; gap: 10px; }
.pd-actions .btn { height: 44px; }
@media (max-width: 760px) {
  .psearches li { flex-wrap: wrap; }
  .ps-act { width: 100%; }
  .ps-act .btn { flex: 1; }
}
.pdetail .notelbl { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
.pdetail .notelbl textarea { grid-column: 1 / -1; }
