/* Scout design system: black + a pink-to-purple accent, quiet surfaces, tabular numbers. */
:root {
  --ink-900: #0a0a0b; --ink-800: #151517; --ink-700: #242428; --ink-600: #3a3a41;
  --text: #111114; --text-2: #4f4f58; --text-3: #7f7f89;
  --line: #e7e9ee; --line-2: #d9dde5;
  --bg: #f6f6f7; --card: #ffffff; --tint: #fafafa;
  /* the accent: a pink-to-purple gradient, with solid stops for lines, text and focus rings */
  --pink: #ec4899; --purple: #8b5cf6;
  --accent: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --brass: #a855f7; --brass-2: #7c3aed; --brass-soft: #f5eeff;
  --navy: #111113; --navy-2: #2c2c33;
  --series: #8b5cf6; --series-own: #eb6834;   /* chart slots 1 and 2 (checked for colour-blind separation) */
  --good: #1b7a46; --good-soft: #e8f4ec;
  --bad: #b42335; --bad-soft: #fcebed;
  --warn: #8a5a00; --warn-soft: #fdf4de;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(14,23,38,.18);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--brass-2); }
h1, h2, h3 { letter-spacing: -.015em; color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.pad { padding: 4px 20px 20px; margin: 0; }
.ico { flex: none; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink-900); color: #cfcfd5; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a3a41 transparent; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px 10px 22px; }
.brand img { display: block; height: 22px; width: auto; mix-blend-mode: screen; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav > span, .settings-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #bdbdc5; text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a:hover, .settings-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on, .settings-link.on { background: linear-gradient(90deg, rgba(236,72,153,.2), rgba(139,92,246,.1)); color: #fff; box-shadow: inset 2px 0 0 var(--pink); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6e6e78; padding: 22px 10px 6px; }
.nav.soon > span { color: #6e6e78; cursor: default; }
.nav.soon em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; color: #e9a8f5; background: rgba(168,85,247,.16); padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255,255,255,.07); padding-top: 12px; }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; }
.who-name { color: #ececf0; font-weight: 600; font-size: 13.5px; }
.who select { background: var(--ink-800); color: #fff; border: 1px solid var(--ink-700); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 13px; }
.main { padding: 28px 36px 120px; max-width: 1280px; width: 100%; }

/* ---------------------------------------------------------------- page furniture */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; line-height: 1.15; margin: 0; font-weight: 700; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-2); }
.eyebrow:not(:has(a)) { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.sub { margin: 6px 0 0; color: var(--text-2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.card-head h2, .card > h2 { font-size: 15.5px; margin: 0; font-weight: 650; }
.link-quiet { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 500; }
.link-quiet:hover { color: var(--navy-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.empty { text-align: center; padding: 36px 24px; color: var(--text-2); }
.empty h2 { margin: 0 0 6px; font-size: 18px; }
.empty pre, pre { display: inline-block; background: var(--tint); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; color: var(--text); font-size: 13px; }
.empty-inline { padding: 8px 20px 22px; color: var(--text-2); }
.empty-inline p { margin: 0 0 12px; }

/* ---------------------------------------------------------------- buttons & controls */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover:not(:disabled) { border-color: #b9c0cc; background: var(--tint); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--navy-2); border-color: var(--navy-2); }
.btn.accent { background: var(--accent); border-color: transparent; color: #fff; }
.btn.accent:hover:not(:disabled) { background: linear-gradient(135deg, #db2777 0%, #7c3aed 100%); border-color: transparent; }
.btn.danger { color: var(--bad); border-color: #efc4ca; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.ghost-dark { background: transparent; color: #ececf0; border-color: rgba(255,255,255,.18); }
.btn.ghost-dark:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.pill-count { background: rgba(255,255,255,.18); padding: 0 8px; border-radius: 999px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); cursor: pointer; font-weight: 500; }
button.link:hover { text-decoration: underline; }
button.link.danger { color: var(--bad); }
form.inline { display: inline; }
select, input[type=text], input[type=search], input[type=date], input[type=url], input[type=email],
input[type=password], input[type=number], input:not([type]), textarea {
  font: inherit; font-size: 14px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; color: var(--text); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(38,64,109,.15); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ---------------------------------------------------------------- flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; font-weight: 500; }
.flash .ico { margin-top: 2px; }
.flash.ok { background: var(--good-soft); border-color: #c4e2cf; color: #14532d; }
.flash.bad { background: var(--bad-soft); border-color: #f2c7cd; color: #7f1d2b; }
.flash.warn { background: var(--warn-soft); border-color: #f1dca6; color: #5c3d00; }
.flash ul { margin: 4px 0 0; padding-left: 18px; font-weight: 400; }

/* ---------------------------------------------------------------- KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--line-2); box-shadow: 0 4px 14px rgba(16,24,40,.07); }
.kpi-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi-value { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.delta.up, .pulse-delta.up { color: var(--good); }
.delta.down, .pulse-delta.down { color: var(--bad); }

/* ---------------------------------------------------------------- charts */
.hbars { list-style: none; margin: 0; padding: 4px 20px 18px; display: flex; flex-direction: column; gap: 2px; }
.hbar-row { display: grid; grid-template-columns: minmax(120px, 42%) 1fr 44px; align-items: center; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 7px; color: inherit; text-decoration: none; }
a.hbar-row:hover, li.hbar-row:hover { background: var(--tint); }
.hbar-label { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; }
.hbar-fill { display: block; height: 100%; background: var(--series); border-radius: 0 4px 4px 0; min-width: 3px; }
.hbar-row.own .hbar-fill { background: var(--series-own); }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; }
.you { display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--text); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.pulse { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0 8px 10px; }
.pulse-tile { padding: 10px 12px 14px; }
.pulse-top { display: flex; justify-content: space-between; align-items: center; }
.pulse-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.pulse-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pulse-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.pulse-value .small { font-weight: 500; letter-spacing: 0; }
.minibars, .colbars { display: flex; align-items: flex-end; height: 44px; gap: 2px; border-bottom: 1px solid var(--line); }
.colbars { height: 120px; margin: 6px 20px 0; gap: 4px; }
.minibar-hit, .colbar-hit { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.minibar, .colbar { display: block; width: 100%; background: var(--series); border-radius: 3px 3px 0 0; }
.colbar { border-radius: 4px 4px 0 0; }
.minibar-hit:hover .minibar, .colbar-hit:hover .colbar { background: #1c5cab; }
.minibars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); padding-top: 4px; }
.card > .minibars-axis { padding: 4px 20px 18px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink-900); color: #fff; font-size: 12.5px; font-weight: 500; padding: 6px 9px; border-radius: 7px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }

/* ---------------------------------------------------------------- feed */
.feed { list-style: none; margin: 0; padding: 0 0 8px; }
.feed li { display: grid; grid-template-columns: 118px 1fr 210px 170px 56px; gap: 14px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.feed-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.feed-detail { font-variant-numeric: tabular-nums; }
.feed-detail s { color: var(--text-3); }
.feed-agent { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-date { color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.evt { justify-self: start; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #f0f0f3; color: #3a3a41; }
.evt-listed { background: #e6f0fb; color: #1c5cab; }
.evt-reduced { background: var(--brass-soft); color: #6b21a8; }
.evt-under_offer, .evt-sold_stc, .evt-completed { background: var(--good-soft); color: var(--good); }
.evt-withdrawn { background: var(--bad-soft); color: var(--bad); }
.evt-back_on_market, .evt-reinstated { background: #efeafb; color: #5b45b0; }
.health { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; padding: 6px 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.dot.warn { background: #d99a1e; }

/* ---------------------------------------------------------------- generate letters */
.day-pick select { min-width: 220px; font-weight: 500; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -4px 14px; padding: 2px 4px 6px; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.tabs a { flex: none; white-space: nowrap; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.tabs a:hover { border-color: var(--line-2); color: var(--text); }
.tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs .n { font-size: 12px; font-weight: 600; background: var(--tint); color: var(--text-2); padding: 0 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tabs a.on .n { background: rgba(255,255,255,.18); color: #fff; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 600; color: var(--text-3); }
.chip input:checked + span { background: var(--brass-soft); border-color: #dccafb; color: #5b1f94; }
.chip input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.group { overflow: hidden; }
.group-head { padding: 16px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(#fff, var(--tint)); }
.group-title { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.group-title input { margin-top: 3px; }
.group-head h2, .removed summary h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px; }
.group-desc { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.count-pill { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--navy); color: #fff; font-variant-numeric: tabular-nums; }
.muted-pill { background: #e4e7ec; color: var(--text-2); }
.props { list-style: none; margin: 0; padding: 0; }
.prop { display: grid; grid-template-columns: 34px 1fr 170px 120px 64px; gap: 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.props .prop:first-child { border-top: 0; }
.prop:hover { background: #fbfbf9; }
.prop:has(input.pick:checked) { background: #fbf6ec; }
.prop-check { display: flex; }
.prop-addr { font-weight: 600; font-size: 14.5px; }
.prop-addr .pc { font-weight: 500; }
.prop-meta { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.prop-price { text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.price-now { font-weight: 650; }
.price-was { font-size: 12px; color: var(--text-3); }
.chg { color: var(--bad); font-weight: 600; margin-left: 3px; }
.prop-time { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.prop-time .k, .prop-reason .k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.prop-link { display: flex; gap: 2px; justify-content: flex-end; }
.prop-link a { color: var(--text-3); display: inline-flex; padding: 4px; border-radius: 6px; }
.prop-link a:hover { color: var(--navy-2); background: var(--tint); }
.pc { color: var(--text-3); white-space: nowrap; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; background: #f0f0f3; color: #44505c; }
.badge-re-listed { background: #efeafb; color: #5b45b0; }
.badge-reduced { background: var(--brass-soft); color: #6b21a8; }
.badge-manual { background: var(--good-soft); color: var(--good); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.actionbar { position: sticky; bottom: 18px; z-index: 10; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 20px; background: var(--ink-900); color: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-lg); margin: 22px 0; }
.ab-count { font-size: 14px; color: #bdbdc5; }
.ab-count b { font-size: 22px; color: #fff; font-variant-numeric: tabular-nums; margin-right: 2px; }
.ab-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ab-note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #8e8e98; }
.removed > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; }
.removed > summary::-webkit-details-marker { display: none; }
.removed > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); margin: 0 4px 4px 0; flex: none; }
.removed[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.removed[open] > summary { border-bottom: 1px solid var(--line); }
.reason-sum { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.reason-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: #f0f0f3; color: #44505c; }
.reason-address { background: var(--warn-soft); color: var(--warn); }
.reason-own_stock { background: #e6f0fb; color: #1c5cab; }
.reason-price { background: #efeafb; color: #5b45b0; }
.removed-row { grid-template-columns: 1fr minmax(200px, 340px) 150px; opacity: .92; }
.removed-row .prop-addr { font-weight: 500; }

/* ---------------------------------------------------------------- tables (sent, archive, settings) */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 14px 18px; margin-bottom: 18px; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 5px; }
.table-card { overflow: hidden; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
table.list td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: #fbfbf9; }
table.list td.addr-cell { font-weight: 600; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.count-line { color: var(--text-2); margin: 0 0 10px; font-size: 13.5px; }
.pager { display: flex; gap: 6px; margin: 14px 0; }
.pager a, .pager b { padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: 13px; }
.pager b { background: var(--navy); color: #fff; border-color: var(--navy); }
.actions { display: flex; gap: 10px; align-items: center; margin: 0 0 18px; }
.summary { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.summary li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13.5px; }
tr.faded td { color: var(--text-3); }
td.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * + * { margin-left: 14px; }
div.row-actions { display: flex; gap: 14px; }
div.row-actions > * + * { margin-left: 0; }

/* ---------------------------------------------------------------- settings */
.settings { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.side { position: sticky; top: 28px; }
.side h2 { font-size: 11.5px; text-transform: uppercase; color: var(--text-3); letter-spacing: .08em; margin: 6px 10px 10px; }
.side nav a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 500; }
.side nav a:hover { background: #ecece8; color: var(--text); }
.side nav a.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.panel { min-width: 0; }
.panel h1 { font-size: 24px; margin: 0 0 6px; }
.panel .lead { color: var(--text-2); margin: 0 0 20px; max-width: 640px; }
.form { padding: 24px; max-width: 680px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 13.5px; }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.field .error { font-size: 13px; color: var(--bad); font-weight: 500; }
.field.has-error input, .field.has-error select { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180,35,53,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .feed li { grid-template-columns: 110px 1fr 160px 56px; }
  .feed-agent { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; }
  .brand { padding: 4px 8px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav span span, .nav-label, .nav.soon, .who { display: none; }
  .side-foot { margin: 0; border: 0; padding: 0; }
  .main { padding: 18px 14px 120px; }
  .prop { grid-template-columns: 30px 1fr auto; }
  .prop-time, .prop-link { display: none; }
  .settings { grid-template-columns: 1fr; }
  .side { position: static; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- A4 letter preview */
.a4-stage { background: #e9e8e3; border-radius: var(--radius); padding: 28px; overflow: auto; display: flex; justify-content: center; }
.a4 { position: relative; width: 210mm; min-height: 297mm; background: #fff center top / 100% 100% no-repeat; box-shadow: 0 6px 24px rgba(0,0,0,.12); color: #111; font-family: var(--font); flex: none; zoom: var(--zoom, .72); }
.a4-lh { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.a4-content { position: relative; padding: var(--top) var(--right) var(--bottom) var(--left); font-size: var(--body-pt); line-height: 1.45; }
.a4-address { font-size: var(--addr-pt); padding-left: var(--addr-pad); line-height: 1.35; min-height: 25mm; }
.a4-body p { margin: 0 0 .9em; }
.a4-body ul, .a4-body ol { margin: 0 0 .9em 1.2em; padding: 0; }
.a4-sign { margin-top: 1.2em; }
.a4-disclaimer { font-size: var(--disc-pt); color: #333; }
.a4-track { display: flex; align-items: center; gap: 4mm; margin-top: 1.6em; font-size: 8.5pt; line-height: 1.35; color: #333; break-inside: avoid; }
.a4-qr svg { display: block; }
.a4-track-text { display: flex; flex-direction: column; gap: .8mm; }
.a4-track-label { font-size: 9pt; color: #111; }
.a4-guides { position: absolute; inset: 0; pointer-events: none; }
.env-window { display: none; position: absolute; left: 20mm; top: 45mm; width: 90mm; height: 35mm; border: 1.5px dashed #2a78d6; border-radius: 3mm; }
.env-window span { position: absolute; top: -5mm; left: 0; font: 600 8pt/1 -apple-system, sans-serif; color: #2a78d6; }
.show-env .env-window { display: block; }
.fold, .margins { display: none; position: absolute; }
.fold { left: 0; right: 0; border-top: 1px dashed #c9c4b8; }
.fold.f1 { top: 99mm; } .fold.f2 { top: 198mm; }
.margins { top: var(--top); left: var(--left); right: var(--right); bottom: var(--bottom); outline: 1px dotted #d6b98a; }
.show-lines .fold, .show-lines .margins { display: block; }
.preview-warn { margin-bottom: 14px; }

/* ---------------------------------------------------------------- Stage 5: account & settings controls */
.who { align-items: center; }
.who-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who-name { color: #ececf0; font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-name:hover { color: #fff; text-decoration: underline; }
.who-agency { color: #8e8e98; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who select { margin-top: 2px; max-width: 150px; }
.signout { background: none; border: 0; color: #8e8e98; cursor: pointer; padding: 6px; border-radius: 7px; display: grid; }
.signout:hover { color: #fff; background: rgba(255,255,255,.08); }
body.auth { background: radial-gradient(900px 520px at 15% -10%, rgba(236,72,153,.28) 0%, transparent 60%), radial-gradient(900px 520px at 95% 110%, rgba(139,92,246,.26) 0%, transparent 60%), var(--ink-900); min-height: 100vh; display: grid; place-items: center; }
.auth-wrap { width: min(420px, 92vw); padding: 40px 0; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 700; font-size: 22px; letter-spacing: -.02em; margin-bottom: 22px; }
.auth-brand img { display: block; height: 30px; width: auto; mix-blend-mode: screen; }
.auth-card { background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.auth-card h1 { margin: 0; font-size: 22px; }
.auth-card .sub { margin: 4px 0 20px; }
.auth-foot { text-align: center; color: #8e8e98; font-size: 12.5px; margin-top: 18px; }
.btn.block { width: 100%; justify-content: center; margin-top: 4px; }
.center { text-align: center; }
.form h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 22px 0 12px; font-weight: 650; }
.form h2:first-child { margin-top: 0; }
.form.wide { max-width: none; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-row .field { min-width: 0; }
.hint.tight { margin: -6px 0 16px; }
.card-head.flush { padding: 0 0 6px; }
.input-suffix, .input-prefix { display: flex; align-items: stretch; }
.input-suffix input, .input-prefix input { flex: 1; min-width: 0; }
.input-suffix input { border-radius: 9px 0 0 9px; }
.input-prefix input { border-radius: 0 9px 9px 0; }
.input-suffix span, .input-prefix span { display: grid; place-items: center; padding: 0 11px; background: var(--tint); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; }
.input-suffix span { border-left: 0; border-radius: 0 9px 9px 0; }
.input-prefix span { border-right: 0; border-radius: 9px 0 0 9px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 4px 0 12px; cursor: pointer; }
.plain-list { list-style: none; margin: 0; padding: 0 20px 16px; }
.plain-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }
.form .plain-list { padding: 0; }
textarea { font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 9px; resize: vertical; }
code { font-size: 12px; background: var(--tint); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
fieldset.field legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.row-actions.left { justify-content: flex-start; margin-top: 8px; }
/* outcodes */
.oc-search { margin: 4px 0 12px; }
.oc-search input { width: 100%; }
.oc-area { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.oc-area > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.oc-area > summary::-webkit-details-marker { display: none; }
.oc-area-name { font-weight: 700; font-size: 15px; min-width: 30px; }
.oc-area-actions { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; padding: 4px 14px 14px; }
.oc-toggle { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; border-radius: 7px; }
.oc-toggle:hover { background: var(--tint); }
.oc-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; width: 34px; height: 20px; border-radius: 999px; background: #d4d8df; position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.oc-toggle input:checked + .switch { background: var(--good); }
.oc-toggle input:checked + .switch::after { transform: translateX(14px); }
.oc-toggle input:focus-visible + .switch { outline: 2px solid var(--brass); outline-offset: 2px; }
.switch-btn { width: 38px; height: 22px; border-radius: 999px; border: 0; background: #d4d8df; position: relative; cursor: pointer; padding: 0; }
.switch-btn span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch-btn.on { background: var(--good); }
.switch-btn.on span { transform: translateX(16px); }
table.triggers td.cb { width: 64px; }
/* editor */
.editor { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.editor:focus-within { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(38,64,109,.15); }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--tint); }
.editor-bar button { font: inherit; font-size: 13px; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 9px; cursor: pointer; color: var(--text); }
.editor-bar button:hover { border-color: #b9c0cc; }
.editor-bar .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.editor-bar select { font-size: 13px; padding: 5px 8px; margin-left: auto; }
.editor-area { min-height: 320px; padding: 18px 20px; font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; line-height: 1.6; outline: none; }
.editor-area p { margin: 0 0 1em; }
/* preview layouts */
.split { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split .form { max-width: none; }
.small-stage { position: sticky; top: 20px; padding: 18px; }
.small-stage .a4 { --zoom: .5; }
.a4-stage .a4 { --zoom: .72; }
.small-stage .a4 { zoom: .5; }
/* letterheads */
.lh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 18px; }
.lh-card { margin: 0; overflow: hidden; }
.lh-card.is-default { border-color: #dccafb; box-shadow: 0 0 0 2px var(--brass-soft); }
.lh-thumb { aspect-ratio: 210 / 297; max-height: 240px; width: 100%; display: grid; place-items: center; background: #f1f0ec; border-bottom: 1px solid var(--line); overflow: hidden; text-align: center; }
.lh-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.lh-body { padding: 12px 14px; }
.prop-preview a { color: var(--text-3); display: inline-flex; padding: 4px; border-radius: 6px; }
.prop-preview a:hover { color: var(--navy-2); background: var(--tint); }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .small-stage { position: static; } }
.hint { font-size: 12.5px; color: var(--text-3); }
.schedule-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; }
.schedule-card .dot { margin-top: 6px; flex: none; }
pre.summary-text { display: block; white-space: pre-wrap; font: 12.5px/1.55 "SF Mono", Menlo, Consolas, monospace; padding: 18px 20px; overflow-x: auto; }

/* ---------------------------------------------------------------- Map */
.main.main-map { max-width: none; padding: 16px 18px 18px; height: 100vh; display: flex; flex-direction: column; }
.mapwrap { flex: 1; display: grid; grid-template-columns: 290px 1fr; gap: 14px; min-height: 0; position: relative; }
.map-side { margin: 0; overflow-y: auto; padding: 16px 16px 18px; }
.map-side-head h1 { font-size: 22px; margin: 0; }
.map-section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.map-label { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.layer-list { list-style: none; margin: 0; padding: 0; }
.layer-list label { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.layer-list label:hover { background: var(--tint); }
.layer-list .swatch { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.12); flex: none; }
.layer-list .swatch.ghost { background: #e4e7ec; }
.layer-list .ll { flex: 1; }
.layer-list .lc { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 12.5px; }
.layer-list .soon label { color: var(--text-3); cursor: default; }
.layer-list em { font-style: normal; font-size: 10.5px; font-weight: 600; color: #6b21a8; background: var(--brass-soft); padding: 1px 7px; border-radius: 999px; }
label.mini { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
label.mini input, label.mini select { width: 100%; padding: 6px 8px; font-size: 13px; }
.map-side .form-row { gap: 10px; margin-bottom: 10px; }
.map-side .flash { margin: 12px 0 0; padding: 9px 11px; font-weight: 400; }
.map-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.map-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.map-tools .btn.primary { background: var(--accent); border-color: transparent; }
.map-count { margin-left: auto; }
.map-canvas { flex: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #e8ebe6; min-height: 420px; }
.plain-map { width: 100%; height: 100%; display: block; cursor: grab; background:
  linear-gradient(#e2e6df 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, #e2e6df 1px, transparent 1px) 0 0 / 40px 40px, #eef1ec; }
.plain-map.drawing { cursor: crosshair; }
.plain-map circle { cursor: pointer; }
.map-legend { position: absolute; left: 12px; top: 50px; display: flex; flex-wrap: wrap; gap: 6px 12px; max-width: 70%;
  background: rgba(255,255,255,.94); border-radius: 9px; padding: 7px 11px; font-size: 12px; box-shadow: var(--shadow); }
.map-legend:empty { display: none; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(0,0,0,.15); }
.map-detail { position: absolute; right: 12px; top: 44px; width: 330px; max-height: calc(100% - 60px); overflow-y: auto; margin: 0; padding: 18px; z-index: 5; box-shadow: var(--shadow-lg); }
.detail-close { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--text-3); cursor: pointer; }
.detail-close:hover { color: var(--text); }
.evt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.detail-layer { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.map-detail h2 { font-size: 17px; margin: 8px 0 2px; }
.map-detail .pc { margin: 0 0 10px; }
.detail-price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.detail-price s { font-size: 14px; color: var(--text-3); font-weight: 500; }
.detail-price .chg { font-size: 14px; }
.map-detail dl { display: grid; grid-template-columns: 82px 1fr; gap: 5px 10px; margin: 0 0 12px; font-size: 13.5px; }
.map-detail dt { color: var(--text-3); }
.map-detail dd { margin: 0; }
.detail-letter { background: var(--brass-soft); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; margin: 10px 0; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.map-actionbar { position: fixed; left: calc(248px + 50%); transform: translateX(-50%); bottom: 18px; width: min(860px, calc(100vw - 300px)); margin: 0; z-index: 20; }
@media (max-width: 1100px) { .mapwrap { grid-template-columns: 1fr; } .map-side { max-height: 260px; } .map-detail { width: 290px; } }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border: 0; background: none; color: var(--text-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--navy); color: #fff; }
.map-canvas gmp-map-3d { display: block; width: 100%; height: 100%; }

.prop.faded-row { opacity: .45; }
.trigger-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 18px; }
.auto-banner { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.badge-auto { background: #e6f0fb; color: #1c5cab; }
.ai-card h2 { color: var(--brass-2) !important; }
.ai-card { border-color: #e8dcc4; background: linear-gradient(#fffdf8, #fff); }

/* ---------------------------------------------------------------- Postcards */
.pc-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: #e9e8e3; border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.pc-side-label { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.pc-scale { width: 100%; aspect-ratio: 210 / 148; overflow: hidden; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.14); container-type: inline-size; }
.pc-scale .pc-face { zoom: var(--pcz, .45); }
.layout-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.layout-pick { display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1.5px solid var(--line-2); border-radius: 10px; cursor: pointer; background: #fff; }
.layout-pick:has(input:checked) { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); }
.layout-pick input { position: absolute; opacity: 0; }
.layout-pick small { color: var(--text-3); }
.lp-thumb { display: block; aspect-ratio: 210 / 148; border-radius: 6px; margin-bottom: 6px; background: #1c2f52; }
.lp-photo { background: linear-gradient(transparent 40%, rgba(0,0,0,.6)), linear-gradient(135deg, #8fa7b8, #c9b79c); }
.lp-split { background: linear-gradient(90deg, #a9b8a4 54%, #1c2f52 54%); }
.pc-editor { min-height: 140px; font-family: inherit; font-size: 15px; }
.badge-postcard { background: var(--brass-soft); color: #6b21a8; }
.seg-select { font-size: 13px; padding: 4px 8px; }
@media (max-width: 1100px) { .pc-stage { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- responses & results */
.lookup { padding: 18px 20px; margin-bottom: 18px; }
.lookup-label { display: block; font-weight: 650; font-size: 15px; margin-bottom: 8px; }
.lookup-row { display: flex; gap: 10px; }
.lookup-row input { flex: 1; font-size: 16px; padding: 11px 14px; letter-spacing: .01em; }
.lookup .hint { margin: 8px 0 0; }
.code { font: 600 12.5px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; background: var(--tint); border: 1px solid var(--line-2); padding: 3px 7px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.code.lg { font-size: 15px; padding: 5px 10px; }
.stage { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.stage-responded { background: #e6f0fb; color: #1c5cab; }
.stage-valuation { background: var(--brass-soft); color: #6b21a8; }
.stage-instructed { background: var(--good-soft); color: var(--good); }
.stage-lost { background: #f0f0f3; color: #5a6573; }
.seg-links { display: flex; gap: 4px; flex-wrap: wrap; }
.seg-links a { font-size: 12.5px; font-weight: 500; color: var(--text-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.seg-links a:hover { border-color: var(--line-2); }
.seg-links a.on { background: var(--navy); color: #fff; }
.seg-links .n { opacity: .7; font-variant-numeric: tabular-nums; margin-left: 2px; }
.resp-grid { align-items: start; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 9px 14px; margin: 0; padding: 4px 20px 18px; }
.facts dt { color: var(--text-3); font-size: 13px; }
.facts dd { margin: 0; }
.mini-head { font-size: 13px; margin: 6px 20px 2px; color: var(--text-2); }
.stage-pick { border: 0; padding: 0; margin: 0 0 14px; }
.stage-pick legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.stage-opt { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; cursor: pointer; }
.stage-opt .stage { font-size: 13px; padding: 4px 11px; }
.danger-row { margin-top: 4px; }
.range-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.range-pick .muted { margin-right: 4px; }
.rchip { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--text-3); cursor: pointer; }
.rchip:hover { color: var(--text); }
.rchip.on { background: var(--brass-soft); border-color: #dccafb; color: #5b1f94; }
.kpis.kpis-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-foot a { color: inherit; }
.funnel { list-style: none; margin: 0; padding: 6px 20px 20px; display: grid; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 14px; }
.funnel-label { font-size: 13px; color: var(--text-2); }
.funnel-track { height: 22px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.funnel-fill { display: block; height: 100%; background: var(--navy); border-radius: 0 4px 4px 0; }
.funnel-n { font-weight: 650; font-variant-numeric: tabular-nums; }
.table-card:has(.results-table) { overflow-x: auto; }
.results-table td { white-space: nowrap; }
.results-table th { white-space: normal; vertical-align: bottom; }
.results-table td:first-child { white-space: normal; min-width: 160px; }
.rate-cell { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 92px; }
.rate-bar { display: inline-block; height: 6px; max-width: 40px; background: var(--series); border-radius: 3px; }
@media (max-width: 1100px) { .kpis.kpis-5 { grid-template-columns: repeat(3, 1fr); } }
/* tracking settings preview */
.track-preview { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px dashed var(--line-2); border-radius: 10px; font-family: Lato, "Helvetica Neue", Arial, sans-serif; font-size: 12.5px; color: #333; }
.track-preview svg { width: 76px; height: 76px; display: block; }
.track-preview b.lbl { display: block; color: #111; font-size: 13px; margin-bottom: 2px; }
.hint a, .track-preview + .hint a { overflow-wrap: anywhere; }
.field.stage-pick { flex-direction: row; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- exclusion list */
.excl-forms { align-items: start; }
.excl-search { display: flex; gap: 8px; padding: 0 20px 14px; }
.excl-search input { flex: 1; max-width: 420px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--bad); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.result-lines { margin: 0 0 8px; padding-left: 18px; }
.result-lines li { margin: 3px 0; }
.result-lines .warn-line { color: var(--warn); }
.upload-result details { margin-top: 6px; }
.upload-result summary { cursor: pointer; font-size: 13px; color: var(--navy-2); }
.dnc-check { margin-top: 2px; }

/* ---------------------------------------------------------------- print & post */
.post-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.stage.post-test, .stage.post-received { background: #f0f0f3; color: #44505c; }
.stage.post-producing, .stage.post-printing { background: var(--brass-soft); color: #6b21a8; }
.stage.post-dispatched, .stage.post-handed_over, .stage.post-local_delivery { background: #e6f0fb; color: #1c5cab; }
.stage.post-delivered { background: var(--good-soft); color: var(--good); }
.stage.post-returned, .stage.post-failed { background: var(--bad-soft); color: var(--bad); }
.stage.post-cancelled { background: #f0f0f3; color: #5a6573; text-decoration: line-through; }
.window-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin: 4px 0 12px; }
.window-check.ok { background: var(--good-soft); color: var(--good); }
.window-check.bad { background: var(--bad-soft); color: var(--bad); }
ol.steps { margin: 0 0 10px; padding-left: 20px; }
ol.steps li { margin: 0 0 10px; }
ol.steps pre { display: block; margin: 8px 0 0; }
.platform-only { border-top: 2px dashed var(--line-2); margin-top: 26px; padding-top: 14px; }
.platform-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------------------------------------------------------------- platform: agencies */
.platform-form .card { margin-bottom: 18px; }
.form .error, .card .error { font-size: 13px; color: var(--bad); font-weight: 500; margin: 4px 0 8px; }
.also { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: #6b21a8; background: var(--brass-soft); border-radius: 999px; padding: 0 7px; }
.copy-row { display: flex; gap: 8px; margin: 6px 0 10px; }
.copy-row input { flex: 1; font: 13px ui-monospace, "SF Mono", Menlo, monospace; }
.invite-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; align-items: center; }
.invite-row input { flex: 1; min-width: 140px; }
.link-btn.neutral { color: var(--navy-2); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }

/* ---------------------------------------------------------------- sold in your area */
.area-top { align-items: start; }
.kind-pick { border: 0; padding: 0; margin: 0 0 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
.kind-pick legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.inline-setting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.inline-setting label { font-weight: 600; font-size: 13px; }
.inline-setting .input-suffix { width: 140px; }
.area-state { font-size: 12.5px; font-weight: 600; }
.area-sent { color: var(--good); }
.area-ready { color: var(--navy-2); }
.area-held { color: var(--warn); font-weight: 500; }
.area-none { color: var(--text-3); font-weight: 500; }
.badge-neighbour { background: #e6f0fb; color: #1c5cab; }
.pc-row { display: flex; gap: 8px; }
.pc-row input { flex: 1; max-width: 220px; text-transform: uppercase; }
.error-text { color: var(--bad) !important; }
.oc-area-town { font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-left: 4px; }

/* ---------------------------------------------------------------- off-market campaigns */
.om-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.om-filters fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.om-filters legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.radio-row { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; cursor: pointer; font-size: 13.5px; }
.radio-row input { margin-top: 3px; }
.om-kpis { grid-template-columns: repeat(3, 1fr); }
.small-value { font-size: 26px; }
.om-create { margin-bottom: 18px; }
.om-create-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.om-create-row .field { flex: 1; min-width: 220px; margin: 0; }
.om-create-row .field input { height: 46px; }
.om-create-row .btn { height: 46px; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
.om-create-notes { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.om-create-notes li { display: flex; gap: 8px; align-items: flex-start; }
.om-create-notes svg { flex: none; margin-top: 2px; color: var(--brass, #a855f7); }
.om-create-notes b { color: var(--text); font-weight: 600; }
.om-create-warn { margin: 14px 0 0; }
@media (max-width: 900px) { .om-create-notes { grid-template-columns: 1fr; } }
.score { display: inline-block; min-width: 32px; text-align: center; font-weight: 700; font-size: 12.5px; border-radius: 999px; padding: 2px 8px; background: #f0f0f3; color: #44505c; }
.score.s60 { background: var(--brass-soft); color: #6b21a8; }
.score.s80 { background: var(--good-soft); color: var(--good); }
.badge-vault { background: #efeafb; color: #5b45b0; }
@media (max-width: 1100px) { .om-layout { grid-template-columns: 1fr; } }
.where-panel { margin: 0 0 10px 24px; }
.view-tabs { margin-bottom: 12px; }
.om-map-card { padding: 0; overflow: hidden; margin-bottom: 18px; }
.om-map { height: 560px; background: #e9e8e3; position: relative; }
.om-map-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 10px 16px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); }
.om-map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.om-map-legend .dot-chosen { background: #111113; }
.om-map-legend .dot-other { background: #a3acb9; }
.om-map-legend .dot-sent { background: #1b7a46; }
.om-map-legend .ring { border: 2px solid #a855f7; background: rgba(168,85,247,.12); width: 12px; height: 12px; }
.om-map-card .hint { padding: 0 16px 12px; margin: 0; }
.om-pop { font: 13px/1.45 -apple-system, BlinkMacSystemFont, sans-serif; color: #121a2a; max-width: 300px; }
.om-pop div + div { margin-top: 2px; }
.om-plain { width: 100%; height: 100%; display: block; background: #f4f3ef; }
.om-plain-tip { position: absolute; left: 12px; bottom: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-lg); }

/* outcode outlines on the maps (outlines.js) */
.oc-label { position: absolute; transform: translate(-50%, -50%); font: 700 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            letter-spacing: .04em; color: #fff; text-shadow: 0 0 3px #0b1424, 0 0 6px #0b1424, 0 1px 2px #0b1424; pointer-events: none; white-space: nowrap; }
.plain-map .oc-line { fill: rgba(17, 17, 19, .04); fill-rule: evenodd; stroke: #111113; stroke-opacity: .75; stroke-width: 1.6px;
                      vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.plain-map .oc-name { fill: #111113; fill-opacity: .7; font-weight: 700; text-anchor: middle; dominant-baseline: middle;
                      letter-spacing: .04em; pointer-events: none; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.om-plain .oc-line { fill: rgba(17, 17, 19, .04); fill-rule: evenodd; stroke: #111113; stroke-opacity: .75; stroke-width: 1.6px;
                     vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.om-plain .oc-name { fill: #111113; fill-opacity: .7; font-weight: 700; text-anchor: middle; dominant-baseline: middle; pointer-events: none;
                     font-family: -apple-system, BlinkMacSystemFont, sans-serif; }

/* Property Reports */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.report-preview { padding: 0; overflow: hidden; background: #e9e8e3; }
.report-preview iframe { display: block; width: 100%; height: calc(100vh - 170px); min-height: 640px; border: 0; }
.report-side .card + .card { margin-top: 18px; }
.report-side form.inline-gap { margin: 0 0 8px; }
@media (max-width: 1100px) { .report-layout { grid-template-columns: 1fr; } }
.report-sections { border: 0; padding: 0; margin: 4px 0 12px; display: grid; gap: 4px; }
.report-sections legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }

/* Landlord Prospecting */
.hbar { display: inline-block; vertical-align: middle; width: 80px; height: 6px; background: var(--tint); border-radius: 3px; overflow: hidden; margin-right: 6px; }
.hbar .hbar-fill { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.facts-list { display: grid; grid-template-columns: 190px 1fr; gap: 8px 16px; margin: 0 0 12px; }
.facts-list dt { color: var(--text-3); font-size: 13px; }
.facts-list dd { margin: 0; }
.bad-text { color: var(--bad); }

.page-head .actions .btn { white-space: nowrap; }

/* Land */
.nav-group > summary { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #bdbdc5; font-weight: 500; font-size: 14px; cursor: pointer; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-group > summary.on { color: #fff; }
.nav-group > summary .ico:last-child { margin-left: auto; transition: transform .15s; }
.nav-group[open] > summary .ico:last-child { transform: rotate(90deg); }
.nav a.sub { padding: 7px 10px 7px 39px; font-size: 13.5px; }
.land-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; height: calc(100vh - 60px); }
.land-side { overflow-y: auto; padding: 18px; }
.land-title { font-size: 22px; margin: 0 0 8px; }
.land-map-wrap { position: relative; padding: 0; overflow: hidden; }
.land-map { width: 100%; height: 100%; min-height: 520px; background: #e9e8e3; }
.land-status { position: absolute; left: 12px; bottom: 28px; background: rgba(17,17,19,.82); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.land-status:empty { display: none; }
.land-layers li label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.land-layers .dot, .plot-layers .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.land-dot-opportunity { background: #a21caf; } .land-dot-constraint { background: #15803d; } .land-dot-heritage { background: #b45309; }
.land-dot-ecology { background: #0f766e; } .land-dot-planning { background: #475569; }
.plot-card { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.plot-head { font-size: 13px; }
.plot-size { font-size: 22px; font-weight: 700; margin: 4px 0 8px; }
.plot-size .muted { font-size: 13px; font-weight: 400; }
.plot-facts { display: grid; grid-template-columns: 120px 1fr; gap: 5px 10px; font-size: 13px; margin: 0 0 10px; }
.plot-facts dt { color: var(--text-3); } .plot-facts dd { margin: 0; }
.plot-layers ul { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 6px; font-size: 13px; }
.plot-layers li .dot { margin-right: 6px; vertical-align: -1px; }
.land-attr { font-size: 10.5px; color: var(--text-3); line-height: 1.4; margin-top: 14px; }
.land-pick { grid-template-columns: 1fr; }
.land-pick fieldset { border: 0; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; }
.land-pick legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.badge.land-badge-opportunity { background: #fae8ff; color: #86198f; } .badge.land-badge-constraint { background: #dcfce7; color: #166534; }
.badge.land-badge-heritage { background: #fef3c7; color: #92400e; } .badge.land-badge-ecology { background: #ccfbf1; color: #115e59; }
.badge.land-badge-planning { background: #f1f5f9; color: #334155; }
.on-link { font-weight: 700; color: var(--text); text-decoration: none; }
.main-map .land-shell { height: auto; flex: 1; min-height: 0; }
@media (max-width: 1000px) { .land-shell, .main-map .land-shell { grid-template-columns: 1fr; height: auto; } .land-map { height: 70vh; }
  .main.main-map:has(.land-shell) { height: auto; } }

.pa-filters { margin: 6px 0; gap: 8px; }
.pa-key { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-2); }
.pa-key .dot, .pa-pop .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.pa-ok { background: #16a34a; } .pa-bad { background: #dc2626; } .pa-open { background: #f59e0b; } .pa-off { background: #94a3b8; }
.land-pop { font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #111114; max-width: 360px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.land-pop .plot-size { font-size: 19px; }
.land-pop h4 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7f7f89; margin: 10px 0 4px; }
.land-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.land-pop .app { border-left: 3px solid #e4e4e7; padding-left: 8px; }
.land-pop .app.ok { border-color: #16a34a; } .land-pop .app.bad { border-color: #dc2626; } .land-pop .app.open { border-color: #f59e0b; }
.land-pop .app .meta { color: #7f7f89; font-size: 12px; }
.land-pop .sv-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; min-height: 26px; }
.land-pop .sv-btn { padding: 4px 10px; font-size: 13px; white-space: nowrap; flex: none; }

/* Data feed (platform) */
.feed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.feed-grid h2, .table-card .pad-h { font-size: 15px; margin: 0 0 12px; }
.table-card .pad-h { padding: 16px 18px 0; }
.feed-summary { box-sizing: border-box; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f6f6f7; border-radius: 8px; padding: 12px; max-height: 320px; overflow: auto; margin: 10px 0; }
.ok-text { color: #15803d; font-weight: 600; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #e4e4e7; border-top-color: #a21caf; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .feed-grid { grid-template-columns: 1fr; } }
.ab-count .ab-all { margin-left: 14px; vertical-align: 3px; }
.report-photo { width: 100%; border-radius: 8px; display: block; margin: 0 0 10px; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------------------------------------------------------------- land map: area search and planning filters */
.area-box .seg { display: flex; margin-bottom: 10px; }
.area-box .seg button { flex: 1; padding: 6px 8px; }
.area-pc { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto; gap: 6px; }
.area-pc input, .area-pc select { padding: 6px 8px; font-size: 13px; min-width: 0; }
.area-pc input { text-transform: uppercase; }
.area-pc input::placeholder { text-transform: none; }
.draw-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.area-now { margin-top: 10px; padding: 9px 11px; border-radius: var(--radius-sm); background: #fdf2f8; border: 1px solid #fbcfe8; }
.area-now-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.area-err { color: var(--bad); margin: 8px 0 0; }
.linkish { font: inherit; font-size: 12.5px; background: none; border: 0; padding: 0; color: var(--brass-2); cursor: pointer; text-decoration: underline; white-space: nowrap; }
.pa-filters { display: grid; gap: 10px; margin: 8px 0 4px; }
.pa-decisions { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.pa-decisions legend { margin-bottom: 5px; }
.pa-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; }
.pa-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pa-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.pa-chip:has(input:not(:checked)) { color: var(--text-3); background: var(--tint); border-style: dashed; }
.pa-chip:has(input:not(:checked)) .dot { background: transparent; box-shadow: inset 0 0 0 1.5px #b8b8c0; }
.pa-chip:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.range2 { display: grid; gap: 4px; padding: 10px 11px; border-radius: var(--radius-sm); background: var(--tint); border: 1px solid var(--line); transition: opacity .15s; }
.range2.off { opacity: .55; }
.range2-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--text-2); }
.range2-head output { color: var(--text); font-variant-numeric: tabular-nums; }
.range2-track { position: relative; height: 26px; }
.range2-track::before { content: ""; position: absolute; left: 8px; right: 8px; top: 11px; height: 4px; border-radius: 4px; background: #e4e4ea; }
.range2-fill { position: absolute; top: 11px; height: 4px; border-radius: 4px; background: var(--accent); }
.range2-track input[type=range] { position: absolute; inset: 0; width: 100%; height: 26px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2; }
.range2-track input[type=range]::-webkit-slider-runnable-track { background: none; height: 26px; }
.range2-track input[type=range]::-moz-range-track { background: none; }
.range2-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: #fff; border: 2px solid var(--pink); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: grab; }
.range2-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--pink); cursor: grab; }
.range2-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--brass); outline-offset: 2px; }
.range2-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); padding: 0 4px; }
.range2 .check { margin-top: 4px; }
.range2 .hint { margin: 0; }
.pa-tools { display: flex; gap: 6px; margin-top: 10px; }
.pa-drawer { position: absolute; top: 10px; right: 60px; bottom: 34px; width: 340px; max-width: calc(100% - 80px); background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; z-index: 5; }
.pa-drawer[hidden] { display: none; }
.pa-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.icon-btn { background: none; border: 0; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--text-2); display: inline-flex; }
.icon-btn:hover { background: var(--tint); }
.pa-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.pa-list li + li { border-top: 1px solid var(--line); }
.pa-item { display: grid; gap: 2px; width: 100%; text-align: left; font: inherit; font-size: 12.5px; background: none; border: 0; padding: 9px 12px; cursor: pointer; color: var(--text); }
.pa-item:hover, .pa-item:focus-visible { background: #fdf2f8; }
.pa-item-top .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.pa-item-addr { font-weight: 600; }
.pa-item-desc { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
