/* YourRealty web — design tokens + components. Self-sufficient (Tailwind CDN only adds small utilities). */
:root {
  /* work mode (v12): one neutral surface scale, text >= 7:1, secondary text >= 5:1, colour only for meaning
     (hot = red, warm = amber, ok = green, info = brand blue). Brand values are overridden inline from brand.yaml. */
  --ink: #1F2933; --sand: #A9BED3; --paper: #F3F4F6; --bronze: #2F5B86;
  --card: #FFFFFF; --line: #D9DEE5; --muted: #5A6473; --text: #1B2129; --soft: #F6F7F9;
  --good: #1F6B45; --good-bg: #E5F2EA; --warn: #80540C; --warn-bg: #FBF0D9; --bad: #B3261E; --bad-bg: #FBE8E6;
  --info: #2F5B86; --info-bg: #E8EFF6; --sand-bg: #E9EFF5; --on-accent: #FFFFFF;
  --shadow: none;
  --shadow-pop: 0 12px 32px rgba(23,22,21,.16);
  --line-soft: #E8EBEF; --on-ink: #E9EDF1; --live: #2E9E5E; --hdr: 57px;
  /* header/ink-derived shades follow the brand ink/sand (white-label), via color-mix */
  --on-ink-2: color-mix(in srgb, var(--on-ink) 82%, var(--ink));
  --ink-2: color-mix(in srgb, var(--ink) 88%, white);      /* active nav bg */
  --ink-3: color-mix(in srgb, var(--ink) 92%, white);      /* lang switch / mobile pills bg */
  --ink-line: color-mix(in srgb, var(--ink) 75%, var(--sand)); /* borders on ink */
  --ink-hover: color-mix(in srgb, var(--ink) 88%, white);
  --sand-hover: color-mix(in srgb, var(--sand) 90%, black);
  --shadow-sm: 0 1px 2px rgba(15,29,46,.06), 0 4px 14px rgba(15,29,46,.05);
  --radius: 12px;
  --font: Inter, 'Noto Sans Armenian', system-ui, sans-serif;
  --font-display: Inter, 'Noto Sans Armenian', system-ui, sans-serif;   /* one family: Latin and Armenian headings match */
}
:root[data-theme="dark"] {
  --paper: #14171B; --card: #1C2026; --line: #2F353D; --muted: #A0A9B4; --text: #E4E7EB; --soft: #171A1F;
  --good-bg: #1C2D24; --warn-bg: #30281A; --bad-bg: #35201E; --info-bg: #1D2A38; --sand-bg: #222B36; --on-accent: #11161C;
  --shadow: none; --shadow-pop: 0 12px 32px rgba(0,0,0,.45); --line-soft: #272C33; --live: #5FBF86;
  /* muted accents for dark surfaces (>= 4.5:1 on card/page, no neon) */
  --bronze: #8FB3D6; --good: #8CC8A4; --warn: #E0B86E; --bad: #F0948A; --info: #8FB3D6; --sand: #A9BED3;
}
@media (prefers-color-scheme: dark) {
:root[data-theme="light"] {
  --paper: #14171B; --card: #1C2026; --line: #2F353D; --muted: #A0A9B4; --text: #E4E7EB; --soft: #171A1F;
  --good-bg: #1C2D24; --warn-bg: #30281A; --bad-bg: #35201E; --info-bg: #1D2A38; --sand-bg: #222B36; --on-accent: #11161C;
  --shadow: none; --shadow-pop: 0 12px 32px rgba(0,0,0,.45); --line-soft: #272C33; --live: #5FBF86;
  /* muted accents for dark surfaces (>= 4.5:1 on card/page, no neon) */
  --bronze: #8FB3D6; --good: #8CC8A4; --warn: #E0B86E; --bad: #F0948A; --info: #8FB3D6; --sand: #A9BED3;
}
:root[data-theme="light"] .btn:not(.ghost):not(.sand):not(.danger):not(.good) { background: var(--sand); color: #0F1D2E; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5;
       font-variant-numeric: tabular-nums; overflow-x: clip; min-height: 100vh; }
img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }
.hidden { display: none; }

/* ------------------------------------------------------------ typography */
.h1 { font-size: clamp(1.35rem, 3.2vw, 1.8rem); line-height: 1.2; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.h2 { font-size: 1.12rem; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.h3 { font-size: 1rem; font-weight: 650; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tiny { font-size: .72rem; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 600; color: var(--bronze); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.nowrap { white-space: nowrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 28px; } }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 0; min-width: 0; }
.grid { display: grid; gap: 14px; }
.cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
main { padding: 24px 0 64px; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.topbar :focus-visible { outline-color: var(--sand); }

/* ------------------------------------------------------------ header / nav */
.topbar { background: var(--ink); color: var(--on-ink); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-ink); min-width: 0; min-height: 44px; }
.brand b { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand .sub { color: var(--sand); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.pill { font-weight: 500; font-size: .8rem; color: var(--sand); border: 1px solid var(--ink-line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.logo { width: 30px; height: 30px; flex: none; }
.topbar-r { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.langs { display: flex; gap: 2px; background: var(--ink-3); padding: 3px; border-radius: 12px; }
.langs a { text-decoration: none; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 9px; font-size: .8rem; font-weight: 600; color: var(--on-ink-2); }
.langs a:hover { color: #fff; }
.langs a.on { background: var(--sand); color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--on-ink-2); white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; }
.logout { color: var(--on-ink-2); font-size: .82rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.logout:hover { color: #fff; }
/* app shell: brand | nav | live+lang. The header wraps instead of scrolling the page. */
.appbar .appbar-in { max-width: 1360px; flex-wrap: wrap; gap: 4px 28px; padding-top: 6px; padding-bottom: 6px; }
.mainnav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.mainnav > a, .mainnav summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--on-ink-2); text-decoration: none; font-weight: 500; font-size: .9rem; white-space: nowrap; cursor: pointer; list-style: none; }
.mainnav summary::-webkit-details-marker { display: none; }
.mainnav > a:hover, .mainnav summary:hover { color: #fff; background: rgba(255,255,255,.06); }
.mainnav > a[aria-current="page"], .mainnav summary.on { background: var(--ink-2); color: var(--on-ink); font-weight: 600; }
.more { position: relative; }
.more[open] summary { background: var(--ink-2); color: var(--on-ink); }
.more[open] summary .ico { transform: rotate(180deg); }
.more-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 220px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; display: grid; gap: 2px; }
.more-menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 9px; text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 500; }
.more-menu a:hover { background: var(--soft); }
.more-menu a[aria-current="page"] { background: var(--sand-bg); font-weight: 600; }
.more-menu a.more-logout { display: none; }
.more-menu a.ext { border-top: 1px solid var(--line-soft); border-radius: 0 0 9px 9px; margin-top: 4px; color: var(--bronze); }
@media (max-width: 640px) {
  .appbar .appbar-in { gap: 0 10px; }
  .appbar .brand { order: 1; }
  .appbar .topbar-r { order: 2; margin-left: auto; gap: 8px; }
  .appbar .live { display: none; }
  .appbar .mainnav { order: 3; flex: 0 0 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  .appbar .mainnav::-webkit-scrollbar { display: none; }
  .appbar .mainnav > a, .appbar .mainnav summary { background: var(--ink-3); border-radius: 999px; padding: 0 16px; }
  .appbar .mainnav > a[aria-current="page"], .appbar .mainnav summary.on, .appbar .more[open] summary { background: var(--sand); color: var(--ink); }
  .more { position: static; }
  .more-menu { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; }
  .pill { display: none; }
  .topbar .wrap { padding: 0 12px; }
}
.statusbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .75rem; color: var(--muted); }

/* ------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 24px; }
.card h2, .card .h2 { margin-bottom: 10px; }
.sect-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 26px 0 12px; }

/* ------------------------------------------------------------ buttons / form */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 8px 18px; min-height: 44px;
       font-weight: 600; cursor: pointer; text-decoration: none; background: var(--ink); color: var(--paper); transition: transform .08s, box-shadow .15s, background .15s; line-height: 1.2; }
.btn:hover { background: var(--ink-hover); box-shadow: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: wait; }
.btn.sand { background: var(--sand); color: var(--ink); }
.btn.sand:hover { background: var(--sand-hover); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); box-shadow: none; }
.btn.danger:hover, .btn.good:hover { filter: brightness(.96); box-shadow: none; }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.good { background: var(--good-bg); color: var(--good); }
/* dark theme: --ink is the light-on-dark inverse of --paper, so default primary buttons use sand with ink text (about 9:1) */
:root[data-theme="dark"] .btn:not(.ghost):not(.sand):not(.danger):not(.good) { background: var(--sand); color: #171615; }
:root[data-theme="dark"] .btn:not(.ghost):not(.sand):not(.danger):not(.good):hover { background: var(--sand-hover); }
.btn.sm { padding: 4px 12px; min-height: 36px; font-size: .84rem; border-radius: 10px; }
.btn.lg { padding: 10px 22px; min-height: 54px; font-size: 1.05rem; border-radius: 14px; width: 100%; }
.field { display: block; }
.field > span { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.input, .select, .textarea { width: 100%; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 13px; min-height: 44px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sand); box-shadow: 0 0 0 3px rgba(200,178,138,.35); }
.textarea { padding: 11px 13px; min-height: 128px; resize: vertical; font-size: 1.05rem; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
          background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.select.sm, .input.sm { padding: 4px 28px 4px 10px; min-height: 36px; border-radius: 10px; font-size: .85rem; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .seg { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.seg button { border: 1.5px solid var(--line); background: var(--soft); border-radius: 14px; padding: 10px 6px; font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--text); transition: all .12s; }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--sand); box-shadow: var(--shadow-sm); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ------------------------------------------------------------ chips / badges */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--sand-bg); color: var(--text); font-size: .86rem; font-weight: 550; border: 1px solid transparent; max-width: 100%; }
.chip small { color: var(--bronze); font-weight: 600; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap; background: var(--line); color: var(--text); }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.sand { background: var(--sand); color: var(--ink); } .badge.ink { background: var(--ink); color: var(--sand); }
.badge.demo { background: repeating-linear-gradient(135deg, #F5DDA0, #F5DDA0 6px, #F0D189 6px, #F0D189 12px); color: #6B4E0C; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; background: var(--muted); }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); }

/* ------------------------------------------------------------ hero (public) */
.hero { background: radial-gradient(1200px 380px at 80% -20%, rgba(200,178,138,.30), transparent 60%), var(--ink); color: var(--paper); padding: 34px 0 86px; }
.hero .eyebrow { color: var(--sand); }
.hero p { color: #CFC6B5; margin: 10px 0 0; max-width: 56ch; }
.hero .alt { color: #8F8778; font-size: .8rem; margin-top: 14px; }
.lift { margin-top: -64px; position: relative; }

/* ------------------------------------------------------------ property cards */
.pcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pcard .art { position: relative; height: 150px; display: flex; align-items: flex-end; padding: 12px 14px; color: #fff; overflow: hidden; }
.pcard .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard .art .skyline { position: absolute; inset: auto 0 0 0; height: 70%; opacity: .22; }
.pcard .art .where { position: relative; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.pcard .art .tl, .pcard .art .tr { position: absolute; top: 10px; }
.pcard .art .tl { left: 10px; } .pcard .art .tr { right: 10px; }
.art-0 { background: linear-gradient(135deg, var(--ink), #4A3B20); } .art-1 { background: linear-gradient(135deg, #2A2724, var(--bronze)); }
.art-2 { background: linear-gradient(135deg, #3A3226, #B09762); } .art-3 { background: linear-gradient(135deg, #1F2A2E, #5E6F6C); }
.art-4 { background: linear-gradient(135deg, #33271F, #A06C45); } .art-5 { background: linear-gradient(135deg, #1D1C1A, #8C7B58); }
.pcard .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .88rem; }
.fit { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.fit > i { display: block; height: 100%; background: linear-gradient(90deg, var(--sand), var(--bronze)); border-radius: 99px; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.reasons li { padding-left: 22px; position: relative; }
.reasons li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.reasons.trade li::before { content: "~"; color: var(--warn); }
.vbar { display: flex; gap: 4px; align-items: center; }
.vbar i { width: 18px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.35); display: block; }
.vbar i.on { background: var(--sand); }
.vbar.dark i { background: var(--line); } .vbar.dark i.on { background: var(--bronze); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }

/* ------------------------------------------------------------ skeleton / htmx */
.skeleton { position: relative; overflow: hidden; background: var(--line); border-radius: 12px; min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--soft); }
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 6px; }

/* ------------------------------------------------------------ stat cards + tooltip */
.stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.stat .v { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat.hot .v { color: var(--bad); } .stat.accent { background: var(--ink); color: var(--paper); border-color: var(--ink); } .stat.accent .l { color: var(--sand); }
.tip { position: relative; display: inline-flex; width: 17px; height: 17px; border-radius: 99px; background: var(--line); color: var(--muted); align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; cursor: help; flex: none; outline: none; }
.tip::after { content: attr(data-tip); position: absolute; z-index: 20; bottom: calc(100% + 8px); right: -8px; width: 230px; max-width: 70vw; background: var(--ink); color: var(--paper); font-weight: 450; font-size: .76rem; line-height: 1.4; padding: 9px 11px; border-radius: 11px; opacity: 0; pointer-events: none; transform: translateY(4px); transition: all .15s; text-align: left; box-shadow: var(--shadow); }
.tip:hover::after, .tip:focus::after { opacity: 1; transform: none; }
.stat .tip { position: static; align-self: flex-end; margin-bottom: -20px; }
.stat .tip::after { left: 10px; right: 10px; width: auto; max-width: none; bottom: calc(100% + 4px); }

/* ------------------------------------------------------------ charts */
.chart-box { position: relative; height: 250px; }
.chart-box.tall { height: 310px; }
.chart-empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; }
.insight { background: linear-gradient(135deg, var(--ink), #2A241A); color: var(--paper); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.insight .big { font-size: 1.1rem; font-weight: 650; line-height: 1.35; }
.insight .eyebrow { color: var(--sand); }
.insight .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: rgba(200,178,138,.18); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

/* ------------------------------------------------------------ tables / lists */
.tbl-wrap { overflow-x: auto; border-radius: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.kv { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); gap: 6px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 14px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 99px; background: var(--sand); border: 2px solid var(--card); }

/* ------------------------------------------------------------ kanban */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { display: block; min-width: 0; } .filters label span { font-size: .7rem; color: var(--muted); font-weight: 600; display: block; margin-bottom: 3px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; align-items: flex-start; }
.col { flex: 0 0 272px; scroll-snap-align: start; background: rgba(23,22,21,.04); border-radius: 18px; padding: 10px; min-height: 140px; }
:root[data-theme="dark"] .col { background: rgba(255,255,255,.04); }
.col.over { outline: 2px dashed var(--sand); background: var(--sand-bg); }
.col h3 { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; margin-bottom: 9px; text-decoration: none; cursor: grab; }
.lcard:hover { border-color: var(--sand); }
.lcard.dragging { opacity: .45; }
.lcard .t { font-weight: 650; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.temp { width: 9px; height: 9px; border-radius: 99px; flex: none; margin-top: 6px; background: var(--line); }
.temp.HOT { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); } .temp.WARM { background: var(--warn); } .temp.COLD { background: var(--info); }

/* ------------------------------------------------------------ misc */
.callout { border-radius: 14px; padding: 12px 14px; background: var(--sand-bg); font-size: .9rem; }
.callout.good { background: var(--good-bg); color: var(--good); } .callout.bad { background: var(--bad-bg); color: var(--bad); } .callout.warn { background: var(--warn-bg); color: var(--warn); }
.pillrow { display: flex; gap: 6px; flex-wrap: wrap; }
.pillrow a { text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; background: var(--card); }
.pillrow a.on { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.qr { background: #fff; padding: 10px; border-radius: 16px; display: inline-block; line-height: 0; border: 1px solid var(--line); }
.qr svg { width: 200px; height: 200px; }
.range { width: 100%; accent-color: var(--bronze); }
.big-num { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; }
#map { height: 240px; border-radius: 16px; z-index: 0; }
.footer { color: var(--muted); font-size: .78rem; text-align: center; padding: 28px 16px; }
.login-card { max-width: 420px; margin: 8vh auto 0; }
.copy-ok { color: var(--good); }
.copy-fail { color: var(--bad); }
@media (max-width: 480px) { .stat .v { font-size: 1.7rem; } .card { padding: 15px; } .pcard .art { height: 132px; } }
@media print { .topbar, .actions { display: none; } }

/* ------------------------------------------------------------ polish layer (v2) */
html[lang="hy"] .eyebrow, html[lang="hy"] .brand .sub, html[lang="hy"] .badge, html[lang="hy"] .tag, html[lang="hy"] .col h3, html[lang="hy"] .tbl th,
html[lang="hy"] .chip small { text-transform: none; letter-spacing: 0; }
html[lang="hy"] .h1, html[lang="hy"] .h2 { letter-spacing: 0; line-height: 1.25; }
html[lang="hy"] .btn, html[lang="hy"] .seg button { line-height: 1.3; }
.h1, .h2, .h3, .pre, .kv dd, .lcard, .pcard .body { overflow-wrap: anywhere; }
.field + .tiny, .field .hint { margin-top: 6px; }
.hint { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.seg button { min-height: 46px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
.btn { text-align: center; }
.stat .tip { margin-bottom: -22px; }
.tbl-sm { font-size: .82rem; } .tbl-sm th { padding: 6px 8px; } .tbl-sm td { padding: 7px 8px; }
.tbl .num, .tbl th.num { text-align: right; }
.src-tbl { border-top: 1px solid var(--line); padding-top: 4px; }

/* radar feed (cards on every width, no wide table) */
.feed, .feed-item, .feed-head, .feed-text { min-width: 0; max-width: 100%; }
.feed-item { padding: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.feed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-when { margin-left: auto; }
.feed-chat { overflow-wrap: anywhere; }
.feed-text { line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }
.feed-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.feed-actions { gap: 8px; margin-top: 2px; }
.stats-list li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 0; }
.stats-list .stats-head { text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; padding-top: 0; }
.stats-list .num { min-width: 64px; text-align: right; flex: none; }
.disc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.disc-row .grow { min-width: 0; }

/* viewings */
.vtitle { font-weight: 650; overflow-wrap: anywhere; }
.vform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vform .input { flex: 1 1 170px; min-width: 0; max-width: 240px; }

/* property rows on phones */
.kvl { display: grid; gap: 8px; }
.pstat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 639px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; } .stat .v { font-size: 1.75rem; } .stat .l { font-size: .78rem; line-height: 1.3; }
  .insight { padding: 14px 16px; } .insight .big { font-size: 1rem; }
  .pcard-row { flex-direction: row; align-items: stretch; }
  .pcard-row .art { flex: 0 0 104px; height: auto; min-height: 118px; padding: 8px; }
  .pcard-row .art .where, .pcard-row .art .tl { display: none; }
  .pcard-row .art .tr { top: 6px; right: 6px; left: 6px; }
  .pcard-row .body { padding: 12px 14px; gap: 6px; min-width: 0; }
  .grid.cols-3 > .pcard-row { min-width: 0; }
  .kpis3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpis3 .big-num { font-size: 1.6rem; }
  .chart-box { height: 230px; }
  .chart-box.tall { height: 270px; }
  .sect-title { margin: 20px 0 10px; }
  .card.pad-lg { padding: 18px; }
  .filters label { flex: 1 1 130px; }
  .filters .select.sm { width: 100%; }
  .statusbar { font-size: .72rem; }
  .vform .input { max-width: none; flex-basis: 100%; }
}
@media (min-width: 900px) { .col { flex: 1 0 250px; } .lcard .t { font-size: 1rem; } }
.stat-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; } .stat-grid-2 .stat .v { font-size: 1.6rem; }
.badge { text-transform: uppercase; } html[lang="hy"] .badge { text-transform: none; }
.src-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .src-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; } }
.src-tbl .tbl { table-layout: fixed; } .src-tbl th:first-child { width: 38%; }
.src-tbl th { white-space: normal; } .src-tbl td:first-child { overflow-wrap: anywhere; }
@media (max-width: 639px) { .src-tbl th { font-size: .64rem; letter-spacing: .04em; padding: 6px 4px; } .src-tbl td { padding: 7px 4px; } }
.vtitle { flex: 1 1 240px; min-width: 0; }
.pcard-row .h3.clip { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- "while you slept" card */
.ov { padding: 16px 18px; }
.ov-live { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pulse { width: 9px; height: 9px; border-radius: 99px; background: var(--good); box-shadow: 0 0 0 0 rgba(47,125,91,.55); animation: ovpulse 2s infinite; }
@keyframes ovpulse { 70% { box-shadow: 0 0 0 9px rgba(47,125,91,0); } 100% { box-shadow: 0 0 0 0 rgba(47,125,91,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 12px; }
.ov-i .v { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.ov-i .v small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.ov-i .l { color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.3; }
.ov-i .hot-t { color: var(--bad); }
@media (min-width: 900px) { .ov-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---- lead board: kanban on desktop, grouped accordion list on phones */
.board-m { display: none; }
@media (max-width: 639px) {
  .board-desk { display: none; }
  .board-m { display: grid; gap: 10px; }
  .mgrp { background: rgba(23,22,21,.04); border-radius: 16px; overflow: hidden; }
  :root[data-theme="dark"] .mgrp { background: rgba(255,255,255,.04); }
  .mgrp > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; min-height: 48px; font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); cursor: pointer; }
  .mgrp > summary::-webkit-details-marker { display: none; }
  .mgrp > summary::after { content: "▾"; margin-left: 10px; transition: transform .2s; }
  .mgrp[open] > summary::after { transform: rotate(180deg); }
  .mgrp > summary .badge { margin-left: auto; }
  .mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 52px; }
  .mrow .t { font-weight: 650; min-width: 0; display: flex; gap: 8px; align-items: center; }
  .mrow .s { grid-column: 1; min-width: 0; }
  .mrow .r { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
}

/* ---- team leaderboard / SLA */
.tbl tr.sla-bad td { background: var(--bad-bg); }
.sortlink { color: inherit; text-decoration: none; } .sortlink:hover, .sortlink.on { color: var(--text); text-decoration: underline; }
.lb th { white-space: normal; vertical-align: bottom; }
.sla-card { border-color: var(--bad); }
.sla-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sla-list li { padding: 6px 10px; border-radius: 10px; background: var(--bad-bg); font-size: .88rem; }

/* ============================================================ design system (redesign v3)
   Components for the Today / lead board / lead detail pages. Colours come from the CSS variables only, so
   white-label brand colours and [data-theme="dark"] apply everywhere.
   .kpi          label (.l) / big value (.v) / sub (.s)    <div class="kpi"><div class="l"></div><div class="v"></div><div class="s"></div></div>
   .tag          small caps chip: .hot .owner .info .good .warn .neutral
   .chip         rounded pill (existing); .chip.on = selected
   .seg.compact  segmented control (buttons or links; aria-pressed="true" / aria-current="true" / .on marks the active one)
   .bar-track > .bar   pure HTML bar, width set inline: style="width:NN%"   (.bar.good/.warn/.bad/.ink)
   .avatar       initial in a sand circle (.avatar.sm / .lg)
   .stepper      pipeline stages: <ol class="stepper"><li class="done|now">..</li></ol>
   .tl           timeline <ul class="tl"><li><i class="tl-dot bot|human"></i>..</li></ul>
   .panel-dark   the ink "next step" card
   .needs        list rows ("needs attention"): <ul class="needs"><li>tag, .nb (b title + span sub), action</li></ul>
   ============================================================ */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .l { font-size: .88rem; font-weight: 500; color: var(--muted); }
.kpi .v { font-size: 2.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .82rem; color: var(--muted); }
@media (max-width: 640px) { .kpi { padding: 16px 18px; } .kpi .v { font-size: 2.1rem; } }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: 2px 8px; background: var(--line); color: var(--text); white-space: nowrap; }
.tag.hot { background: var(--bad-bg); color: var(--bad); } .tag.owner { background: var(--sand-bg); color: var(--bronze); }
.tag.info { background: var(--info-bg); color: var(--info); } .tag.good { background: var(--good-bg); color: var(--good); }
.tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.neutral { background: var(--line-soft); color: var(--muted); }
.chip.on { background: var(--ink); color: var(--paper); }
a.chip { text-decoration: none; }
.seg.compact { display: inline-flex; gap: 2px; background: var(--line-soft); border-radius: 12px; padding: 3px; }
.seg.compact > button, .seg.compact > a { border: 0; background: transparent; border-radius: 9px; padding: 0 14px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .86rem; color: var(--muted); text-decoration: none; cursor: pointer; box-shadow: none; }
.seg.compact > [aria-pressed="true"], .seg.compact > [aria-current="true"], .seg.compact > .on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(23,22,21,.08); }
.bar-track { height: 10px; background: var(--line-soft); border-radius: 999px; overflow: hidden; min-width: 0; }
.bar { height: 100%; background: var(--sand); border-radius: 999px; min-width: 2px; }
.bar.ink { background: var(--ink); } .bar.good { background: var(--good); } .bar.warn { background: var(--warn); } .bar.bad { background: var(--bad); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sand-bg); color: var(--bronze); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; border: 1px solid var(--line); }
.avatar.sm { width: 28px; height: 28px; font-size: .78rem; } .avatar.lg { width: 56px; height: 56px; font-size: 1.3rem; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; counter-reset: st; }
.stepper li { flex: 1 0 auto; counter-increment: st; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--line-soft); color: var(--muted); font-size: .84rem; font-weight: 600; white-space: nowrap; }
.stepper li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; }
.stepper li.done { background: var(--good-bg); color: var(--good); } .stepper li.done::before { content: "\2713"; background: var(--good); color: #fff; }
.stepper li.now { background: var(--ink); color: var(--paper); } .stepper li.now::before { background: var(--sand); color: var(--ink); }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
ul.tl > li, ol.tl > li { position: relative; padding: 0 0 18px 28px; }
ul.tl > li::before, ol.tl > li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: -2px; width: 2px; background: var(--line-soft); }
ul.tl > li:last-child::before, ol.tl > li:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--line); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.tl-dot.bot { background: var(--sand); box-shadow: 0 0 0 1px var(--sand); } .tl-dot.human { background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.panel-dark { background: var(--ink); color: var(--on-ink); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-dark h2, .panel-dark .h2 { margin: 0; color: var(--on-ink); }
.panel-dark .muted, .panel-dark .sub { color: var(--on-ink-2); }
.panel-dark .btn { background: var(--sand); color: var(--ink); } .panel-dark .btn.ghost { background: transparent; color: var(--on-ink); border-color: var(--ink-line); }
.needs { list-style: none; margin: 0; padding: 0; }
.needs > li { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.needs > li:first-child { border-top: 0; }
.needs .nb { flex: 1 1 260px; min-width: 0; } .needs .nb b { display: block; font-weight: 600; } .needs .nb span { font-size: .84rem; color: var(--muted); }

/* ------------------------------------------------------------ Today page */
.today { display: flex; flex-direction: column; gap: 24px; }
.today-hd { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.today-h1 { margin: 6px 0 0; }
.btn.lg-btn { min-height: 48px; padding: 0 22px; }
.today-live { display: flex; flex-direction: column; gap: 24px; }
.today-sum { margin: 0; font-size: 1.12rem; line-height: 1.5; max-width: 760px; color: var(--text); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kdot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); display: inline-block; }
.kdot.good { background: var(--good); } .kdot.warn { background: var(--warn); } .kdot.neutral { background: var(--sand); }
.row2 { display: flex; flex-wrap: wrap; gap: 24px; }
.row2 > .r-main { flex: 3 1 540px; } .row2 > .r-side { flex: 2 1 340px; }
.empty-ok { display: flex; align-items: center; gap: 14px; padding: 18px 0 6px; }
.ok-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.needs form { margin: 0; }
.work-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.work-list li { display: flex; align-items: baseline; gap: 12px; font-size: .92rem; }
.work-list .wn { min-width: 3ch; font-weight: 700; font-size: 1.15rem; color: var(--sand); text-align: right; }
.work-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.work-err { font-size: .9rem; font-weight: 600; }
.work-err.ok { color: var(--live); }
.work-err.bad { color: var(--sand); text-decoration: underline; }
.an-hd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.nm { font-size: .92rem; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.src-row { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) minmax(90px, auto); align-items: center; gap: 14px; }
.src-row .nums { text-align: right; white-space: nowrap; font-size: .9rem; }
.bar-track.tall { height: 12px; } .bar-track.fat { height: 26px; border-radius: 8px; } .bar-track.fat .bar { border-radius: 8px; }
.fn-row { display: flex; flex-direction: column; gap: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .84rem; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--sand); } .sw.ink { background: var(--ink); }
.dist-row { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) 48px; align-items: center; gap: 14px; }
.dbars { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.drow { display: flex; align-items: center; gap: 8px; }
.drow .bar { height: 10px; flex: none; max-width: calc(100% - 40px); }
.gap { font-weight: 700; text-align: right; font-size: .9rem; }
.gap.bad { color: var(--bad); } .gap.muted { color: var(--muted); } .gap.good { color: var(--good); }
.insight { margin-top: 20px; padding: 16px 18px; border-radius: 14px; background: var(--sand-bg); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.insight p { margin: 0; flex: 1 1 280px; font-size: .92rem; }
.ins-ico { color: var(--bronze); display: inline-flex; }
.team-tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.team-tbl th { text-align: left; font-size: .76rem; font-weight: 500; color: var(--muted); padding: 8px; }
.team-tbl th.num, .team-tbl td.num { text-align: right; }
.team-tbl td { padding: 12px 8px; border-top: 1px solid var(--line-soft); }
.team-tbl td.slow { color: var(--bad); font-weight: 700; }
@media (max-width: 640px) { .src-row { grid-template-columns: minmax(0, 1fr) auto; } .src-row .bar-track { grid-column: 1 / -1; order: 3; } .dist-row { grid-template-columns: minmax(0, 1fr) 44px; } .dist-row .dbars { grid-column: 1 / -1; order: 3; } }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--on-ink); border-radius: 12px; padding: 12px 16px; font-size: .92rem; box-shadow: var(--shadow-pop); }

/* ------------------------------------------------------------ Lead board */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lb { display: flex; flex-direction: column; gap: 18px; }
.lb > * + * { margin-top: 0; }
.lb-hd { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.lb-hd .h1 { margin: 0; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lb-actions .btn .ico { margin-right: 2px; }
.lb-sum { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.lb-filters { display: flex; flex-direction: column; gap: 10px; }
.lb-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lb-search { flex: 1 1 280px; max-width: 420px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.lb-search:focus-within { border-color: var(--sand); box-shadow: 0 0 0 3px rgba(200,178,138,.35); }
.lb-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; background: transparent; color: var(--text); min-height: 42px; }
.lb-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.qchip { min-height: 44px; padding: 0 16px; font-size: .9rem; font-weight: 600; background: var(--card); border-color: var(--line); cursor: pointer; font-family: inherit; color: var(--text); }
.chip.qchip:hover { border-color: var(--sand); }
.chip.qchip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lb-more > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); list-style: none; }
.lb-more > summary::-webkit-details-marker { display: none; }
.lb-more[open] > summary { color: var(--text); }
.lb-more .filters { padding: 10px 0 2px; }
.lb-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.lb-empty p { margin: 0; }
.board-root .lcard { cursor: grab; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; }
.board-root .lcard.hot { border-color: var(--bad); }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lc-age { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.lc-age .temp { margin-top: 0; }
.lc-name { font-weight: 700; font-size: .95rem; color: var(--text); text-decoration: none; display: inline-block; padding: 10px 0; margin: -10px 0; min-height: 44px; box-sizing: border-box; position: relative; z-index: 1; }
.lc-name:hover { color: var(--bronze); }
.lc-need { font-size: .84rem; line-height: 1.4; overflow-wrap: anywhere; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.lc-meta { font-size: .76rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.lc-foot form { margin: 0; flex: none; }
.btn.sm.lc-act { white-space: normal; text-align: center; min-height: 44px; max-width: 150px; }
.mrow .tag { margin-left: auto; }

/* ------------------------------------------------------------ Lead detail */
.wrap.ld { display: flex; flex-direction: column; gap: 18px; max-width: 1360px; }
.ld-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--bronze); }
.ld-back:hover { color: var(--text); }
.ld-head { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.ld-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.ld-id { flex: 1 1 320px; min-width: 0; }
.ld-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ld-h1 { margin: 0; font-size: clamp(1.6rem, 5vw, 2rem); line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ld-pid { color: var(--muted); font-weight: 500; font-size: .7em; letter-spacing: 0; white-space: nowrap; }
.ld-sub { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.ld-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.ld-actions form { margin: 0; }
.ld-claim { display: flex; flex-wrap: wrap; gap: 8px; }
.ld-claim .select { width: auto; min-width: 160px; max-width: 100%; min-height: 48px; }
.ld-lost > summary { list-style: none; cursor: pointer; }
.ld-lost > summary::-webkit-details-marker { display: none; }
.ld-lost[open] { flex: 1 1 100%; }
.ld-lostform { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ld-lostform .select, .ld-lostform .input { flex: 1 1 200px; width: auto; }
.ld-lostbanner { margin: 0; }
.ld-steps li[aria-current="step"] { font-weight: 800; }
.ld-status > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--bronze); }
.ld-status form { margin-top: 6px; }
.ld-cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .ld-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); } }
.ld-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ld-quote { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--paper); font-size: .92rem; line-height: 1.55; }
.ld-utm { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ld-total { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.ld-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.ld-bar { display: flex; align-items: center; gap: 10px; }
.ld-bl { display: block; font-size: .84rem; margin-bottom: 4px; }
.ld-bv { min-width: 3ch; text-align: right; font-size: .9rem; }
.ld-tot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ld-matches { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.ld-match.pcard { flex-direction: row; flex-wrap: wrap; }
.ld-match .ld-art { flex: 0 0 150px; display: block; text-decoration: none; }
.ld-match .ld-art .art { height: 100%; min-height: 150px; }
.ld-match .body { flex: 1 1 240px; min-width: 0; }
@media (max-width: 640px) { .ld-match .ld-art { flex: 1 1 100%; } .ld-match .ld-art .art { height: 132px; min-height: 0; } }
.ld-price { font-size: 1.2rem; }
.ld-why { display: flex; flex-direction: column; gap: 4px; }
.ld-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.ld-foot form { margin: 0; }
.btn.sm.ld-act { min-height: 44px; }
.ld-vform { display: flex; flex-direction: column; gap: 8px; }
.ld-lbl { font-size: .8rem; font-weight: 600; color: var(--on-ink-2); margin-top: 4px; }
.panel-dark .input, .panel-dark .select { background-color: var(--ink-3); border-color: var(--ink-line); color: var(--on-ink); color-scheme: dark; }
.panel-dark .input:focus, .panel-dark .select:focus { border-color: var(--sand); }
.ld-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.ld-slot { position: relative; display: inline-flex; }
.ld-slot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ld-slot span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--ink-line); font-weight: 600; font-size: .9rem; }
.ld-slot input:checked + span { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.ld-slot input:focus-visible + span { outline: 2px solid var(--sand); outline-offset: 2px; }
.ld-vlist { border-top: 1px solid var(--ink-line); padding-top: 12px; }
.ld-vlist .list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ld-ev { font-size: .92rem; }
.ld-tl > li { padding-bottom: 16px; }
.ld-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.ld-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ld-legend .tl-dot { position: static; width: 10px; height: 10px; border-width: 0; }
/* ------------------------------------------------------------ opportunities page */
.op-hd { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.op-hd .h1 { overflow-wrap: normal; word-break: keep-all; hyphens: manual; }
@media (max-width: 640px) { .op-hd > .grow { flex: 1 1 100%; } .op-hd .h1 { font-size: 1.55rem; } }
.op-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.op-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.op-sec { scroll-margin-top: 80px; }
.op-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.op-top { display: flex; gap: 12px; align-items: flex-start; }
.op-rank { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sand); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.op-price { font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.op-price small { font-size: .85rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.op-meta { font-weight: 600; }
.op-why, .op-warn { margin: 0; padding-left: 20px; }
.op-why li { color: var(--good); } .op-warn li { color: var(--warn); }
.op-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.op-acts .btn { text-decoration: none; }
.btn.sm.op-call { min-height: 44px; font-size: .95rem; }
.op-det > summary { cursor: pointer; font-weight: 600; color: var(--bronze); min-height: 44px; display: flex; align-items: center; }
.op-script { background: var(--sand-bg); border-radius: 12px; padding: 12px; margin: 8px 0; }
.op-script.cl { background: var(--good-bg); }
.op-raw { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; background: var(--soft); border-radius: 12px; padding: 10px; }
.op-client { border-width: 2px; margin-bottom: 18px; }
.op-sub { margin: 14px 0 10px; font-weight: 700; }
.op-send { display: inline-flex; margin: 0; }

/* ------------------------------------------------------------ rent-only pages (clients / best flats / flats for clients) */
.op-ch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.op-name { font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; }
.op-client { display: flex; flex-direction: column; gap: 12px; }
.op-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; margin: 0; }
.op-fact { min-width: 0; }
.op-fact dt { font-size: .78rem; color: var(--muted); font-weight: 500; }
.op-fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.op-acts .btn.op-call, .op-send .btn.op-call, .op-go.btn.sand { min-height: 48px; font-size: 1rem; padding: 0 18px; text-decoration: none; }
.op-nocontact { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.op-go.btn { align-self: flex-start; }
.op-msec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 80px; }
.op-client { scroll-margin-top: 80px; }
.op-empty .op-steps { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.op-src { margin: 0; }
/* lot photo (Best / Matches cards): first photo on top, lazy, cropped, "+N" badge; no photo = nothing rendered */
.op-photo { position: relative; margin: 0; width: 100%; aspect-ratio: 16 / 9; max-height: 240px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.op-photo a { display: block; width: 100%; height: 100%; }
.op-photo img { display: block; width: 100%; height: 100%; max-height: 240px; object-fit: cover; }
.op-photo-n { position: absolute; right: 8px; bottom: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(23, 22, 21, .74); color: #fff; font-size: .8rem; font-weight: 600; line-height: 1.4; }
/* premium (expensive owner lots, exclusive agreement) */
.op-prem-sec { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--bronze); border-radius: 18px; background: var(--sand-bg); }
.op-prem-sec .op-card { margin-bottom: 0; }
.op-prem-h { margin: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.op-prem-tag { align-self: flex-start; margin-bottom: 6px; }
.op-card.op-premium { border-color: var(--bronze); }
.op-script.prem { background: var(--sand-bg); border-left: 4px solid var(--bronze); border-radius: 12px; }
.op-script.prem p { margin: 6px 0 0; }
@media (max-width: 640px) { .op-acts .btn.op-call { flex: 1 1 100%; justify-content: center; } .op-price { font-size: 1.5rem; } }

/* ------------------------------------------------------------ VIP / relocation clients (Task 16) */
.op-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.op-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: .9rem; text-decoration: none; }
.op-chip.on { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.op-t-out { white-space: nowrap; }
.op-chip-n { font-variant-numeric: tabular-nums; font-size: .8rem; opacity: .8; }
.op-vip { border-color: var(--bronze); border-width: 2px; box-shadow: inset 4px 0 0 var(--bronze); }
.op-reloc { box-shadow: inset 4px 0 0 var(--info); }
.op-tier { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.op-t-budget { font-weight: 700; font-variant-numeric: tabular-nums; }
.op-t-why { margin: 0; }
.op-alt { padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }

/* client quality badge (Clients tab) */
.op-score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.op-score { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; border: 1px solid var(--line); }
.op-score-hot { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.op-score-warm { background: var(--sand); border-color: var(--sand); color: var(--ink); }
.op-score-low { background: var(--card); color: var(--muted); }
.op-score-why { margin: 0; }

/* home page: clients strip (counts that open the pages) */
.op-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; padding: 12px; }
.op-strip-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--paper); color: var(--text); text-decoration: none; min-height: 44px; }
.op-strip-item b { font-size: 1.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.op-strip-item span { font-size: .8rem; opacity: .75; }
.op-strip-item:hover { background: var(--sand); color: var(--ink); }
.tag.warn.op-t-na { background: #FBE9D7; color: #7A3E00; }
.op-exp-sec { display: grid; gap: 12px; }

/* ---- owner's home page (app/home.html) */
.hm-q{margin:8px 0 0}
.hm-grid2{display:grid;grid-template-columns:3fr 2fr;gap:16px}
.hm-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
@media (max-width:980px){.hm-grid2,.hm-grid3{grid-template-columns:1fr}}
.hm-searches,.hm-sources{padding:8px 20px}
.hm-srow{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}
.hm-srow:last-child{border-bottom:0}
.hm-srow.hm-head{padding:6px 0;color:var(--muted)}
.hm-srow .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.hm-ico{font-size:22px;width:32px;text-align:center;flex:0 0 32px}
.hm-nums{display:flex;flex-direction:column;align-items:center;min-width:52px;flex:0 0 52px}
.hm-nums b{font-size:20px;line-height:1.1}
.hm-nums small{color:var(--muted)}
.hm-src{padding:10px 0;border-bottom:1px solid var(--line)}
.hm-src:last-of-type{border-bottom:0}
.hm-more{display:inline-block;margin-top:8px}
.hm-kpis .kpi{text-decoration:none;color:inherit}
.hm-item{padding:12px 0;border-bottom:1px solid var(--line)}
.hm-item:last-child{border-bottom:0}
.hm-item .op-acts{margin:8px 0 4px}
.hm-wants{margin:4px 0}
.hm-price{font-size:19px;font-weight:700}
.hm-sub{margin-top:16px;padding-top:12px;border-top:2px solid var(--line)}

/* ---- compact cards: clients / best lots / matches (same language as the home page "My radar") ---- */
.cc-bar { gap: 8px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.cc-bar .op-chip { min-height: 38px; padding: 0 12px; font-size: .85rem; }
.cc-bar .seg.compact { margin-right: 4px; }
.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cc-bar .op-chip { min-height: 44px; } }
.cc.card, .cc-grid > .op-card { padding: 14px 16px; gap: 8px; margin: 0; }
.cc.card { display: flex; flex-direction: column; border-width: 1px; overflow-wrap: anywhere; }
.cc-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.cc-name { margin: 0; font-size: 1.1rem; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; min-width: 0; flex: 1 1 140px; }
.cc-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cc-badges .op-score { min-height: 24px; padding: 0 10px; font-size: .8rem; }
.cc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cc-wants { margin: 0; font-weight: 700; line-height: 1.4; }
.cc-wants::before { content: "🏠 "; font-weight: 400; }
.cc-wants.cc-com::before { content: none; }
.cc-wants span + span::before { content: " · "; font-weight: 400; color: var(--muted); }
.cc-wants small { font-weight: 500; color: var(--muted); }
.cc-extra { margin: 0; font-size: .85rem; color: var(--muted); }
.cc-extra span + span::before { content: " · "; }
.cc-tier { margin: 0; font-size: .85rem; }
.cc-tier .op-t-why { color: var(--muted); }
.cc-src { margin: 0; font-size: .8rem; color: var(--muted); }
.cc .op-acts, .op-card .op-acts { gap: 6px; }
.cc .op-acts .btn.op-call, .op-card .op-acts .btn.op-call { min-height: 40px; font-size: .9rem; padding: 0 14px; }
.cc .op-nocontact, .op-card .op-nocontact { padding: 6px 10px; font-size: .85rem; }
.cc-det > summary, .lc-more > summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--bronze); min-height: 32px; display: flex; align-items: center; }
.cc-det .op-raw { margin: 4px 0 0; max-height: 220px; overflow: auto; }
.cc-det .op-script { margin: 4px 0; }
.cc-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; min-height: 36px; text-decoration: none; color: var(--bronze); }
/* lot card */
.lc-row { display: flex; gap: 12px; align-items: flex-start; }
.lc-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lc-top .op-price { font-size: 1.3rem; line-height: 1.2; }
.lc-top .op-price small { font-size: .78rem; }
.lc-tags { display: inline-flex; align-items: center; gap: 6px; }
.lc-tags .op-rank { width: 24px; height: 24px; font-size: .78rem; }
.lc-tags .op-prem-tag { margin: 0; }
.lc-main .op-meta { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.lc-cond { font-size: .85rem; color: var(--muted); }
.lc-cond span + span::before { content: " · "; }
.lc-row > .op-photo { flex: 0 0 96px; width: 96px; height: 96px; aspect-ratio: 1; max-height: 96px; border-radius: 10px; }
.lc-row > .op-photo img { max-height: 96px; }
.lc-row > .op-photo .op-photo-n { right: 4px; bottom: 4px; padding: 1px 7px; font-size: .72rem; }
.lc-why { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lc-why-t { font-size: .78rem; color: var(--muted); font-weight: 600; }
.lc-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--good-bg); color: var(--good); font-size: .8rem; font-weight: 600; line-height: 1.5; }
.lc-more { display: contents; }
.lc-more > summary { display: inline-flex; padding: 2px 8px; min-height: 0; font-size: .8rem; }
.lc-warn { margin: 0; font-size: .82rem; color: var(--warn); }
.lc-dets { display: flex; flex-wrap: wrap; gap: 0 16px; }
.lc-dets > details[open] { flex: 1 0 100%; }
.lc-dets .op-raw { max-height: 200px; overflow: auto; }
.op-prem-sec { padding: 14px; gap: 12px; }
.op-prem-sec .cc-grid { gap: 12px; }
@media (max-width: 640px) { .cc .op-acts .btn.op-call, .op-card .op-acts .btn.op-call { flex: 1 1 auto; min-height: 44px; } }
@media (max-width: 480px) { .lc-top .op-price { font-size: 1.2rem; } .lc-row > .op-photo { flex-basis: 80px; width: 80px; height: 80px; } .cc-bar { padding: 8px; } }
/* a phone + its chat apps stay together on one row (wraps on phones) */
.op-phone { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.op-acts .btn.op-msg { min-height: 40px; padding: 0 12px; font-size: .88rem; font-weight: 600; text-decoration: none; }
.op-acts .btn.op-wa { color: #128c4b; border-color: #25d36655; }
.op-acts .btn.op-vb { color: #6f3faa; border-color: #7360f255; }
.op-acts .btn.op-tg { color: #1f7fbf; border-color: #2aabee55; }
:root[data-theme="dark"] .op-acts .btn.op-wa { color: #86BC9C; }
:root[data-theme="dark"] .op-acts .btn.op-vb { color: #AFA3D6; }
:root[data-theme="dark"] .op-acts .btn.op-tg { color: #8EB0D2; }
@media (max-width: 640px) { .op-phone { flex-basis: 100%; } .op-phone .btn.op-call { flex: 1 1 100%; } .op-acts .btn.op-msg { flex: 1 1 0; justify-content: center; min-height: 44px; } }

/* ============================================================ YourRealty app layer (v10): mobile-first cards, live feed
   Palette lives once: config/brand.yaml -> --ink / --sand / --paper / --bronze (inline in base.html). */
[hidden] { display: none !important; }
h1, .h1, .h2, .cc-name, .op-price, .brand b { font-family: var(--font-display); }
.h1 { letter-spacing: -.025em; }
main { padding: 18px 0 72px; }
.topbar { border-bottom: 1px solid var(--ink-line); }
.brand b { letter-spacing: -.02em; }
.pill { color: var(--sand); background: color-mix(in srgb, var(--sand) 12%, transparent); border-color: transparent; }
.card, .cc.card, .op-card { border-radius: 18px; box-shadow: var(--shadow-sm); }

/* filter bar: one scrollable row on a phone */
.cc-bar { border-radius: 16px; box-shadow: var(--shadow-sm); }
@media (max-width: 640px) {
  .cc-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; padding: 10px 16px; }
  .cc-bar::-webkit-scrollbar { display: none; }
  .cc-bar > * { flex: none; }
}
.op-chip.on { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.seg.compact > a.on, .seg.compact > a[aria-current="true"] { background: var(--ink); color: var(--sand); box-shadow: none; }
:root[data-theme="dark"] .op-chip.on, :root[data-theme="dark"] .seg.compact > a.on { background: var(--sand); color: #0F1D2E; border-color: var(--sand); }
@media (prefers-color-scheme: dark) { :root[data-theme="light"] .op-chip.on, :root[data-theme="light"] .seg.compact > a.on { background: var(--sand); color: #0F1D2E; border-color: var(--sand); } }

/* live counters */
.cl-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cl-stat { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); }
.cl-stat.hot { color: var(--text); }
.cl-stat.new { background: var(--sand); border-color: var(--sand); color: #0F1D2E; }
.cl-stat .live-dot { animation: gs-pulse 2s ease-in-out infinite; }
@keyframes gs-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cl-stat .live-dot { animation: none; } }

/* client card: when + who + what on top, big contact buttons, options as a horizontal strip */
.cc.card { gap: 10px; padding: 14px 14px 12px; position: relative; }
.cc.is-new { border-color: var(--bronze); box-shadow: inset 4px 0 0 var(--bronze), var(--shadow-sm); }
.cc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cc-ago { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--sand-bg); color: var(--bronze); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.cc-ago .ico { flex: none; }
.new-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 6px; background: var(--sand); color: #0F1D2E; font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.cc-srcname { margin-left: auto; font-size: .78rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-name { font-size: 1.2rem; letter-spacing: -.015em; }
.cc-wants { font-size: 1rem; }
.cc-wants::before { content: none; }
.cc-wants .cc-bud b { color: var(--bronze); font-size: 1.05rem; }
.cc-extra { margin-top: -4px; }

/* contact buttons: a big Call, then equal messenger buttons */
.cc .op-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cc .op-phone { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cc .op-phone .btn.op-call { grid-column: 1 / -1; min-height: 50px; font-size: 1.05rem; font-weight: 700; border-radius: 14px; background: var(--bronze); color: var(--on-accent); border-color: var(--bronze); }
.cc .op-phone .btn.op-call:hover { background: color-mix(in srgb, var(--bronze) 88%, black); }
.cc .op-phone .op-msg { min-height: 44px; padding: 0 6px; border-radius: 12px; font-size: .86rem; font-weight: 700; border-width: 1.5px; }
.cc .op-wa { color: #128C4A; border-color: color-mix(in srgb, #25D366 55%, transparent); background: color-mix(in srgb, #25D366 12%, transparent); }
.cc .op-tg { color: #1F7AB8; border-color: color-mix(in srgb, #2AABEE 55%, transparent); background: color-mix(in srgb, #2AABEE 12%, transparent); }
.cc .op-vb { color: #6E52B8; border-color: color-mix(in srgb, #7360F2 50%, transparent); background: color-mix(in srgb, #7360F2 11%, transparent); }
:root[data-theme="dark"] .cc .op-wa { color: #86BC9C; } :root[data-theme="dark"] .cc .op-tg { color: #8EB0D2; } :root[data-theme="dark"] .cc .op-vb { color: #AFA3D6; }
.cc .op-acts > .btn.op-call { flex: 1 1 140px; min-height: 44px; border-radius: 12px; }
.cc .op-acts > .btn.op-call.ghost { border-color: var(--line); }

/* options strip */
.cc-flats { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 14px 6px; margin: 0 -14px; scrollbar-width: thin; }
.cc-flat { flex: none; scroll-snap-align: start; width: 164px; display: grid; grid-template-columns: 1fr auto; gap: 1px 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); text-decoration: none; color: var(--text); }
.cc-flat b { font-size: .95rem; font-family: var(--font-display); }
.cc-flat span { grid-column: 1; font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-flat i { grid-row: 1 / span 2; grid-column: 2; font-style: normal; align-self: center; }
.cc-flat.ag { border-style: dashed; }
.cc-flat:hover { border-color: var(--bronze); }
.cc-det > summary { color: var(--bronze); }
.cc-go { color: var(--bronze); }

/* lot cards (best / matches) */
.lc-row > .op-photo { flex-basis: 104px; width: 104px; height: 104px; max-height: 104px; border-radius: 12px; }
.lc-top .op-price { font-size: 1.4rem; }

/* mobile: bottom tab bar for the three main pages (also the Telegram Mini App) */
@media (max-width: 640px) {
  .appbar .mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; order: 0; flex: none; gap: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); overflow: visible; box-shadow: 0 -4px 18px rgba(15,29,46,.08); }
  .appbar .mainnav > a { flex: 1 1 0; justify-content: center; min-height: 48px; padding: 0 4px; border-radius: 12px; background: transparent; color: var(--muted); font-size: .86rem; }
  .appbar .mainnav > a[aria-current="page"] { background: var(--sand-bg); color: var(--bronze); font-weight: 700; }
  .appbar .appbar-in { min-height: 52px; }
}

/* ============================================================ work mode (v12)
   Principles: one calm neutral surface scale (no dark header block, no shadows, 10px radius), one type family for
   Latin + Armenian, text >= 7:1 and secondary text >= 5:1, colour only for meaning (hot = red, warm = amber,
   ok = green, brand blue = the one action colour), tabular numbers, the client's WANT + BUDGET as the headline,
   then who + contact buttons, then options as a plain list, then source/time. Everything is driven by tokens, so
   brand.yaml and [data-theme="dark"] apply unchanged. */
body { line-height: 1.45; }
.small { font-size: .875rem; } .tiny { font-size: .78rem; }
.h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.015em; }
.h2 { font-size: 1.05rem; font-weight: 650; } .h3 { font-size: .95rem; }
main { padding: 14px 0 80px; }
.wrap { max-width: 1240px; }
.stack-lg > * + * { margin-top: 14px; }
.card, .cc.card, .op-card, .kpi, .cc-bar, .empty, .callout { border-radius: 10px; box-shadow: none; }
.card { padding: 16px 18px; }
.btn { border-radius: 8px; min-height: 40px; font-weight: 600; }
.btn.ghost { background: var(--card); }
.btn.sm { border-radius: 7px; }
.input, .select, .textarea { border-radius: 8px; background: var(--card); }
.input:focus, .select:focus, .textarea:focus, .lb-search:focus-within { border-color: var(--bronze); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bronze) 22%, transparent); }
.tag { font-size: .7rem; font-weight: 600; letter-spacing: .02em; padding: 2px 7px; border-radius: 5px; }
.tag.neutral { background: var(--line-soft); color: var(--muted); }
.tag.warn.op-t-na { background: var(--warn-bg); color: var(--warn); }
.badge { border-radius: 5px; }

/* ---- shell: a light header with underlined tabs (the brand ink stays for primary actions) */
.topbar.appbar { background: var(--card); color: var(--text); border-bottom: 1px solid var(--line); }
.appbar .appbar-in { min-height: var(--hdr); padding-top: 0; padding-bottom: 0; gap: 0 18px; }
.appbar .brand, .appbar .brand b { color: var(--text); }
.appbar .pill { color: var(--muted); background: var(--soft); border: 1px solid var(--line); font-size: .74rem; }
.appbar .mainnav { gap: 2px; align-self: stretch; }
.appbar .mainnav > a { min-height: var(--hdr); padding: 0 12px; border-radius: 0; color: var(--muted); font-weight: 500; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.appbar .mainnav > a:hover { background: transparent; color: var(--text); }
.appbar .mainnav > a[aria-current="page"] { background: transparent; color: var(--text); font-weight: 600; border-bottom-color: var(--bronze); }
.appbar .mainnav .nav-s { display: none; }       /* short tab labels: phones only */
.appbar .live { color: var(--muted); font-size: .8rem; }
.appbar .langs { background: var(--soft); border: 1px solid var(--line); padding: 2px; border-radius: 8px; }
.appbar .langs a { min-height: 32px; padding: 0 10px; border-radius: 6px; color: var(--muted); font-size: .78rem; }
.appbar .langs a:hover { color: var(--text); }
.appbar .langs a.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(15,29,46,.12); }
.appbar .logout { color: var(--muted); font-size: .8rem; }
.appbar .logout:hover { color: var(--text); }
.appbar :focus-visible { outline-color: var(--bronze); }
.footer { padding: 24px 16px; }

/* ---- page head + sticky filter bar */
.op-hd { align-items: flex-start; gap: 8px 16px; }
.op-hd .muted.small { font-size: .85rem; }
.cc-bar { position: sticky; top: var(--hdr); z-index: 20; margin: 0; padding: 8px 0; gap: 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--paper); box-shadow: none; }
.cc-bar .seg.compact { margin-right: 6px; }
.op-chip, .cc-bar .op-chip { min-height: 34px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: .84rem; font-weight: 500; }
.op-chip:hover { border-color: var(--muted); }
.op-chip-n { opacity: 1; color: var(--muted); font-size: .78rem; }
.op-chip.on, :root[data-theme="dark"] .op-chip.on { background: var(--text); color: var(--card); border-color: var(--text); }
.op-chip.on .op-chip-n { color: inherit; opacity: .75; }
.seg.compact { background: var(--card); border: 1px solid var(--line); padding: 2px; border-radius: 8px; }
.seg.compact > a, .seg.compact > button { min-height: 28px; padding: 0 11px; border-radius: 6px; font-size: .84rem; font-weight: 500; }
.seg.compact > a.on, .seg.compact > a[aria-current="true"], .seg.compact > [aria-pressed="true"], .seg.compact > button.on,
:root[data-theme="dark"] .seg.compact > a.on { background: var(--text); color: var(--card); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root[data-theme="light"] .op-chip.on, :root[data-theme="light"] .seg.compact > a.on { background: var(--text); color: var(--card); border-color: var(--text); } }
.cl-stats { gap: 4px 16px; margin: 0 0 2px; }
.cl-stat { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 500; gap: 6px; }
.cl-stat.hot { color: var(--text); font-weight: 600; }
.cl-stat.new { background: var(--info-bg); color: var(--info); padding: 2px 9px; border-radius: 5px; }
#cl-live.stack-lg > * + * { margin-top: 10px; }

/* ---- client card: WANT + BUDGET first, then who, then contact buttons, then options as a list, then source */
.cc-grid { gap: 12px; }
.cc.card { padding: 12px 14px 10px; gap: 7px; border: 1px solid var(--line); }
.cc.is-new { border-color: var(--line); box-shadow: inset 3px 0 0 var(--bronze); }
.op-vip { border-color: var(--line); border-width: 1px; box-shadow: inset 3px 0 0 var(--warn); }
.op-reloc { box-shadow: inset 3px 0 0 var(--info); }
.cc-top { gap: 8px; font-size: .8rem; color: var(--muted); }
.cc-ago { background: transparent; color: var(--muted); padding: 0; min-height: 0; font-weight: 500; font-size: .8rem; }
.new-badge { background: var(--bronze); color: var(--on-accent); min-height: 20px; padding: 0 7px; border-radius: 4px; font-size: .66rem; letter-spacing: .06em; }
.cc-wants { margin: 0; font-size: 1.12rem; font-weight: 650; line-height: 1.35; letter-spacing: -.005em; color: var(--text); }
.cc-wants .cc-bud b { color: var(--text); font-size: 1.12rem; font-weight: 750; }
.cc-wants small { font-size: .84rem; font-weight: 500; color: var(--muted); }
.cc-wants.cc-com { font-size: 1rem; font-weight: 550; }
.cc-hd { align-items: center; gap: 4px 10px; }
.cc-name { font-size: .98rem; font-weight: 600; letter-spacing: 0; flex: 1 1 120px; }
.cc-badges { gap: 5px; }
.cc-badges .op-score, .op-score { min-height: 22px; padding: 0 8px; border: 0; border-radius: 5px; font-size: .74rem; font-weight: 700; }
.op-score-hot { background: var(--bad-bg); color: var(--bad); }
.op-score-warm { background: var(--warn-bg); color: var(--warn); }
.op-score-low { background: var(--line-soft); color: var(--muted); }
.cc-tags { gap: 4px 6px; }
.cc-extra, .cc-tier { margin: 0; font-size: .85rem; color: var(--muted); }
.cc-extra { margin-top: -3px; }
.cc-tier { color: var(--text); }

/* contact buttons: Call = the one filled button; messengers and links = quiet outlined buttons, one row */
.cc .op-acts, .op-card .op-acts, .hm-item .op-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cc .op-phone { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 6px; }
.op-acts .btn.op-call:not(.ghost), .cc .op-phone .btn.op-call { min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: .95rem; font-weight: 650; background: var(--bronze); color: var(--on-accent); border-color: var(--bronze); }
.op-acts .btn.op-call:not(.ghost):hover, .cc .op-phone .btn.op-call:hover { background: color-mix(in srgb, var(--bronze) 86%, black); }
:root[data-theme="dark"] .btn.op-call:not(.ghost):not(.sand):not(.danger):not(.good) { background: var(--bronze); color: var(--on-accent); }
@media (prefers-color-scheme: dark) { :root[data-theme="light"] .btn.op-call:not(.ghost):not(.sand):not(.danger):not(.good) { background: var(--bronze); color: var(--on-accent); } }
.op-acts .btn.op-call.ghost, .cc .op-acts > .btn.op-call { flex: 0 1 auto; min-height: 38px; padding: 0 12px; border-radius: 8px; font-size: .9rem; font-weight: 600; border-color: var(--line); background: var(--card); color: var(--text); }
.op-acts .btn.op-call.ghost:hover { border-color: var(--muted); background: var(--card); }
.cc .op-phone .op-msg, .op-acts .btn.op-msg { min-height: 38px; padding: 0 11px; border-radius: 8px; font-size: .84rem; font-weight: 600; border: 1px solid var(--line); background: var(--card); }
.cc .op-wa, .op-acts .btn.op-wa { color: #0F7A3F; border-color: var(--line); background: var(--card); }
.cc .op-tg, .op-acts .btn.op-tg { color: #1C6EA8; border-color: var(--line); background: var(--card); }
.cc .op-vb, .op-acts .btn.op-vb { color: #5D43A6; border-color: var(--line); background: var(--card); }
.op-acts .btn.op-msg:hover { border-color: var(--muted); }
:root[data-theme="dark"] .cc .op-wa, :root[data-theme="dark"] .op-acts .btn.op-wa { color: #8CC8A4; }
:root[data-theme="dark"] .cc .op-tg, :root[data-theme="dark"] .op-acts .btn.op-tg { color: #8FB3D6; }
:root[data-theme="dark"] .cc .op-vb, :root[data-theme="dark"] .op-acts .btn.op-vb { color: #B9ADE0; }
.cc .op-nocontact, .op-card .op-nocontact { padding: 6px 10px; border-radius: 7px; font-size: .84rem; }

/* options: a plain list (price · rooms · m² · district · owner/agency), no horizontal scrolling, nothing cut */
.cc-flats-h { margin: 2px 0 0; padding-top: 7px; border-top: 1px solid var(--line-soft); font-size: .78rem; font-weight: 600; color: var(--muted); }
.cc-flats { display: flex; flex-direction: column; gap: 0; overflow: visible; padding: 0; margin: 0; scroll-snap-type: none; }
.cc-flat { width: auto; display: grid; grid-template-columns: minmax(7.5em, auto) minmax(0, 1fr) auto; align-items: baseline; gap: 0 10px; padding: 3px 0; border: 0; border-radius: 0; background: transparent; font-size: .85rem; }
.cc-flat b { font-size: .9rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--font); }
.cc-flat span { grid-column: auto; font-size: .82rem; color: var(--text); }
.cc-flat i { grid-row: auto; grid-column: auto; font-size: .78rem; }
.cc-flat.ag { border: 0; } .cc-flat.ag span { color: var(--muted); }
.cc-flat:hover b { color: var(--bronze); text-decoration: underline; }
.cc-flats-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 28px; font-size: .82rem; font-weight: 600; color: var(--bronze); }
.cc-flats-more > summary::-webkit-details-marker { display: none; }
.cc-flats-more[open] > summary { display: none; }
.op-acts .btn.op-call.op-link, .cc .op-acts > .btn.op-call.op-link { border-color: transparent; background: transparent; color: var(--bronze); padding: 0 8px; font-weight: 600; }
.op-acts .btn.op-call.op-link:hover { background: var(--info-bg); border-color: transparent; }
.cc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin-top: 1px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.cc-foot > details[open] { flex: 1 0 100%; }
.cc-det > summary, .lc-more > summary { font-size: .84rem; min-height: 30px; color: var(--bronze); }
.cc-go { font-size: .86rem; min-height: 30px; }
.op-raw { font-size: .875rem; line-height: 1.5; border-radius: 8px; }
.op-script { border-radius: 8px; }

/* ---- lot card (Best / Matches): price first, facts, contacts, why, source */
.op-card.card, .cc-grid > .op-card { padding: 12px 14px 10px; gap: 7px; }
.lc-row { gap: 12px; }
.lc-row > .op-photo { flex-basis: 88px; width: 88px; height: 88px; max-height: 88px; border-radius: 8px; }
.lc-row > .op-photo img { max-height: 88px; }
.lc-top .op-price { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.lc-top .op-price small { font-size: .82rem; margin-left: 5px; }
.lc-tags .op-rank { width: 22px; height: 22px; font-size: .72rem; background: var(--line-soft); color: var(--muted); }
.lc-main .op-meta { font-weight: 600; font-size: .95rem; }
.lc-cond { font-size: .85rem; }
.lc-why { gap: 3px 6px; }
.lc-why-t { font-size: .78rem; }
.lc-chip { font-size: .78rem; padding: 1px 8px; font-weight: 600; }
.lc-warn { font-size: .82rem; }
.cc-src { font-size: .8rem; }
.lc-dets { gap: 0 14px; border-top: 1px solid var(--line-soft); padding-top: 2px; }
.op-prem-sec { border-radius: 10px; border-color: var(--line); background: var(--soft); padding: 12px; gap: 10px; }
.op-prem-h { font-size: 1.12rem; }
.op-card.op-premium { border-color: var(--line); box-shadow: inset 3px 0 0 var(--bronze); }
.op-exp-sec { gap: 10px; }
.op-msec { gap: 10px; }
.op-alt { border-radius: 8px; font-size: .9rem; }
.op-send { margin-top: 4px; }

/* ---- home («My radar»): rows, not posters */
.hm-q { font-size: .95rem; font-weight: 600; color: var(--muted); margin: 6px 0 0; }
.hm-grid2, .hm-grid3 { gap: 12px; }
.hm-searches, .hm-sources { padding: 4px 16px; }
.hm-srow { padding: 10px 0; }
.hm-srow .grow > b { font-size: .95rem; }
.hm-ico { font-size: 19px; width: 28px; flex-basis: 28px; }
.hm-nums b { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-nums small { font-size: .78rem; }
.hm-src { padding: 9px 0; }
.kpi { padding: 14px 16px; gap: 3px; }
.kpi .l { font-size: .8rem; } .kpi .v { font-size: 2rem; letter-spacing: -.02em; }
.hm-item { padding: 10px 0; }
.hm-item > .row-between > b { font-size: .95rem; }
.hm-item .op-acts { margin: 6px 0 2px; }
.hm-wants { font-weight: 600; color: var(--text); font-size: .9rem; margin: 3px 0; }
.hm-price { font-size: 1.1rem; font-weight: 700; }
.hm-item .op-acts .btn.op-call, .hm-item .op-acts .btn.op-call.ghost, .hm-item .op-phone .btn.op-call { min-height: 34px; font-size: .85rem; padding: 0 10px; border-radius: 7px; }
.hm-item .op-acts .btn.op-msg { min-height: 34px; padding: 0 9px; font-size: .8rem; border-radius: 7px; }
.hm-item .small.muted { font-size: .8rem; }
.hm-sub { border-top-width: 1px; margin-top: 12px; padding-top: 10px; }

/* ---- phone: the same hierarchy, full-width Call + three equal messenger buttons, bottom tab bar */
@media (max-width: 640px) {
  :root { --hdr: 53px; }
  .appbar .appbar-in { min-height: 52px; }
  .appbar .mainnav > a { min-height: 48px; padding: 0 4px; border-radius: 10px; border-bottom: 0; margin: 0; font-size: .8rem; font-weight: 500; }
  .appbar .mainnav > a[aria-current="page"] { background: var(--info-bg); color: var(--bronze); font-weight: 600; border-bottom: 0; }
  .appbar .langs a { min-height: 32px; padding: 0 9px; }
  .h1 { font-size: 1.3rem; }
  .cc-bar { margin: 0 -16px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
  .cc.card { padding: 12px 12px 10px; }
  .cc-wants { font-size: 1.05rem; }
  .cc .op-phone { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cc .op-phone .btn.op-call { grid-column: 1 / -1; min-height: 44px; font-size: 1rem; }
  .cc .op-phone .op-msg { min-height: 40px; padding: 0 4px; justify-content: center; }
  .cc .op-acts > .btn.op-call, .op-acts .btn.op-call.ghost { flex: 1 1 auto; min-height: 42px; justify-content: center; }
  .op-acts .btn.op-call:not(.ghost) { flex: 1 1 100%; min-height: 44px; justify-content: center; }
  .op-acts .btn.op-msg { flex: 1 1 0; justify-content: center; min-height: 40px; }
  .cc-flat { grid-template-columns: minmax(6.5em, auto) minmax(0, 1fr) auto; align-items: start; padding: 4px 0; }
  .cc-flat span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
  .appbar .mainnav .nav-l { display: none; } .appbar .mainnav .nav-s { display: inline; }
  .hm-nums { min-width: 42px; flex-basis: 42px; } .hm-nums b { font-size: 1.05rem; }
  .hm-srow .grow .small { font-size: .8rem; }
  .lc-row > .op-photo { flex-basis: 76px; width: 76px; height: 76px; max-height: 76px; }
  .lc-top .op-price { font-size: 1.15rem; }
  main { padding-bottom: 92px; }
}

/* ---------- /app/find (v14): a short form, then the best homes as a calm reading list. No photo downloads. */
.fd-form { padding: 16px 16px 14px; display: grid; gap: 16px; }
.fd-f { display: grid; gap: 8px; }
.fd-l { display: block; font-weight: 650; font-size: .95rem; color: var(--text); }
.fd-hint { font-weight: 450; color: var(--muted); font-size: .84rem; margin-left: 4px; }
.fd-seg3, .fd-seg6 { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .fd-seg6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fd-seg { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 6px; font-weight: 600; font-size: .95rem; cursor: pointer; color: var(--text); text-align: center; min-height: 46px; display: flex; align-items: center; justify-content: center; line-height: 1.2; transition: background .12s, color .12s, border-color .12s; }
.fd-seg.on { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.fd-seg input, .fd-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-chip { display: inline-flex; align-items: center; padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-size: .92rem; font-weight: 550; cursor: pointer; user-select: none; min-height: 40px; }
.fd-chip.on { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.fd-check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.fd-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.fd-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .fd-row { grid-template-columns: 1fr 1fr; } }
.fd-money { display: grid; grid-template-columns: 1fr 112px; gap: 8px; }
.fd-form .input { width: 100%; min-height: 46px; font-size: 1rem; }
.fd-text { min-height: 64px; resize: vertical; }
.fd-more-opts { border-top: 1px solid var(--line-soft); padding-top: 10px; display: grid; gap: 14px; }
.fd-more-opts > summary { cursor: pointer; font-weight: 600; color: var(--bronze); list-style: none; font-size: .92rem; }
.fd-more-opts > summary::before { content: '+ '; }
.fd-more-opts[open] > summary::before { content: '− '; }
.fd-actions { display: flex; gap: 10px; align-items: center; }
.fd-go { flex: 1; min-height: 50px; font-size: 1.05rem; }
.fd-res-hd { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fd-think { margin: 4px 0 0; font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fd-think.htmx-request { opacity: 1; }
.fd-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: fd-spin .9s linear infinite; display: inline-block; }
@keyframes fd-spin { to { transform: rotate(360deg); } }
.fd-thought { margin: 0 0 4px; font-size: .86rem; color: var(--good); }
.fd-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .fd-list { grid-template-columns: 1fr 1fr; } .fd-thought { grid-column: 1 / -1; } }
.fd-card { padding: 14px 16px; display: grid; gap: 8px; }
.fd-card.owner { border-left: 4px solid var(--good); }
.fd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--muted); font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fd-price { font-size: 1.35rem; font-weight: 750; letter-spacing: -.01em; }
.fd-price small { font-size: .84rem; font-weight: 550; color: var(--muted); margin-left: 8px; }
.fd-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.fd-meta { font-size: 1rem; color: var(--text); }
.fd-gal { display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; border-radius: 10px; }
.fd-gal-i { flex: 0 0 46%; scroll-snap-align: start; display: block; height: 150px; }
.fd-gal[data-n="1"] .fd-gal-i { flex-basis: 100%; height: 190px; }
.fd-gal img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
.fd-sum { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.45; }
.fd-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.fd-open { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.fd-src { font-size: .82rem; color: var(--muted); margin-left: auto; }
.fd-embed { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.fd-embed[hidden] { display: none; }
.fd-more { grid-column: 1 / -1; display: flex; justify-content: center; padding: 6px 0 14px; }
.fd-market { font-size: .86rem; font-weight: 500; }

/* ============================================================ YourRealty Pro (v15) — Fable 5.1, 2026-11-03
   A product surface an agency would pay for: one quiet neutral scale with real depth (hairline borders + a soft
   1-2px shadow, lift on hover), a confident shell (icon tabs on the laptop, an icon tab bar on the phone), one
   display face for numbers (Manrope) so prices read at a glance, 8-pt rhythm, and every control the same height
   in a toolbar. Everything is token-driven: brand.yaml (ink / sand / paper / bronze) and dark mode still apply. */
:root {
  --paper: #F4F6F8; --card: #FFFFFF; --soft: #F8FAFC; --line: #E2E6EB; --line-soft: #EDF0F3;
  --text: #182029; --muted: #5B6672;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 7px;
  --shadow-card: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lift: 0 6px 18px rgba(16,24,40,.08), 0 2px 6px rgba(16,24,40,.06);
  --shadow-pop: 0 18px 44px rgba(16,24,40,.18);
  --font-num: Manrope, Inter, 'Noto Sans Armenian', system-ui, sans-serif;
  --ctl: 36px;                     /* toolbar control height */
  --hdr: 60px;
}
:root[data-theme="dark"] { --paper: #121519; --card: #1A1E24; --soft: #161A1F; --line: #2B3139; --line-soft: #242930;
  --shadow-card: 0 1px 2px rgba(0,0,0,.35); --shadow-lift: 0 8px 22px rgba(0,0,0,.45); }
@media (prefers-color-scheme: dark) { :root[data-theme="light"] { --paper: #121519; --card: #1A1E24; --soft: #161A1F; --line: #2B3139; --line-soft: #242930;
  --shadow-card: 0 1px 2px rgba(0,0,0,.35); --shadow-lift: 0 8px 22px rgba(0,0,0,.45); } }

body { font-size: 15px; line-height: 1.5; letter-spacing: -.003em; }
main { padding: 18px 0 88px; }
.wrap { max-width: 1280px; padding: 0 20px; }
.stack-lg > * + * { margin-top: 16px; }
.h1 { font-size: 1.55rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; }
.h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: .95rem; font-weight: 650; }
.small { font-size: .875rem; } .tiny { font-size: .78rem; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---- surfaces: hairline + soft shadow, lift on hover for anything clickable inside */
.card, .cc.card, .op-card, .kpi, .empty, .callout { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.card { padding: 18px 20px; }
a.card:hover, a.kpi:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); transition: box-shadow .15s, transform .15s; }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; background: var(--card); }

/* ---- controls */
.btn { border-radius: var(--radius-sm); min-height: 40px; padding: 0 16px; font-weight: 600; letter-spacing: 0; transition: background .15s, box-shadow .15s, transform .08s, border-color .15s; }
.btn.primary { background: var(--bronze); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--bronze) 86%, black); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-card); }
.btn.ghost:hover { border-color: var(--muted); background: var(--card); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: var(--radius-xs); }
.input, .select, .textarea { border-radius: var(--radius-sm); background: var(--card); border-color: var(--line); box-shadow: inset 0 1px 2px rgba(16,24,40,.04); }
.tag { font-size: .72rem; font-weight: 650; letter-spacing: .01em; padding: 3px 8px; border-radius: 6px; line-height: 1.25; }
.tag.neutral { background: var(--line-soft); color: var(--muted); }
.tag.owner, .tag.good { background: var(--good-bg); color: var(--good); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.badge { border-radius: 6px; }

/* ---- shell: brand mark in a tile, icon tabs with a bronze underline, quiet right side */
.topbar.appbar { background: var(--card); border-bottom: 1px solid var(--line); }   /* no backdrop-filter here: it would turn the fixed phone tab bar into a header child */
.appbar .appbar-in { min-height: var(--hdr); gap: 0 22px; max-width: 1280px; padding: 0 20px; }
.appbar .brand { gap: 10px; }
.appbar .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--sand); padding: 7px; box-shadow: var(--shadow-card); }
.appbar .brand b { font-size: 1.08rem; font-weight: 750; letter-spacing: -.02em; }
.appbar .mainnav { gap: 4px; align-self: stretch; }
.appbar .mainnav > a { min-height: var(--hdr); padding: 0 12px; gap: 8px; color: var(--muted); font-weight: 550; font-size: .93rem; border-bottom: 2px solid transparent; }
.appbar .mainnav > a .nav-i { width: 18px; height: 18px; opacity: .75; }
.appbar .mainnav > a:hover { color: var(--text); }
.appbar .mainnav > a:hover .nav-i { opacity: 1; }
.appbar .mainnav > a[aria-current="page"] { color: var(--text); font-weight: 650; border-bottom-color: var(--bronze); }
.appbar .mainnav > a[aria-current="page"] .nav-i { opacity: 1; color: var(--bronze); }
.appbar .live { font-size: .8rem; color: var(--muted); }
.appbar .live-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.appbar .langs { background: var(--soft); border: 1px solid var(--line); padding: 2px; border-radius: 9px; }
.appbar .langs a { min-height: 30px; padding: 0 10px; border-radius: 7px; font-size: .76rem; font-weight: 600; }
.appbar .langs a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-card); }
.footer { color: var(--muted); font-size: .8rem; padding: 28px 20px; }

/* ---- page head: title, one muted line (the paragraphs join with middots), counts stay readable */
.op-hd { margin-bottom: 2px; }
.op-hd .grow > p.muted.small { display: inline; margin: 0; font-size: .875rem; }
.op-hd .grow > p.muted.small + p.muted.small::before { content: " · "; color: var(--line); }
.op-hd .grow > .h1 + p { display: block; margin-top: 6px; }
.op-hd .grow > .h1 + p ~ p { display: inline; }

/* ---- toolbar: every control the same height, one radius, one quiet style; the active one is ink */
.cc-bar { position: sticky; top: var(--hdr); z-index: 20; padding: 10px 0; gap: 8px; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.seg.compact { background: var(--card); border: 1px solid var(--line); padding: 3px; border-radius: var(--radius-sm); box-shadow: var(--shadow-card); gap: 2px; }
.seg.compact > a, .seg.compact > button { min-height: calc(var(--ctl) - 6px); padding: 0 12px; border-radius: 7px; font-size: .85rem; font-weight: 550; color: var(--muted); }
.seg.compact > a:hover, .seg.compact > button:hover { color: var(--text); background: var(--soft); }
.seg.compact > a.on, .seg.compact > a[aria-current="true"], .seg.compact > [aria-pressed="true"], .seg.compact > button.on,
:root[data-theme="dark"] .seg.compact > a.on { background: var(--ink); color: var(--sand); box-shadow: none; }
.op-chip, .cc-bar .op-chip { min-height: var(--ctl); padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: .85rem; font-weight: 550; box-shadow: var(--shadow-card); gap: 6px; }
.op-chip:hover { border-color: var(--muted); }
.op-chip.on, :root[data-theme="dark"] .op-chip.on { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.op-chip.on .op-chip-n { color: inherit; opacity: .8; }
.cl-stats { gap: 6px 16px; margin: 2px 0 0; }
.cl-stat { font-size: .84rem; }
.cl-stat.new { border-radius: 6px; }

/* ---- client card: who-wants-what in two seconds, one filled Call, quiet messengers, options as a ledger */
.cc-grid { gap: 14px; }
.cc.card { padding: 14px 16px 12px; gap: 8px; }
.cc.card:hover { box-shadow: var(--shadow-lift); }
.cc.is-new { box-shadow: inset 3px 0 0 var(--bronze), var(--shadow-card); }
.op-vip { box-shadow: inset 3px 0 0 var(--warn), var(--shadow-card); }
.op-reloc { box-shadow: inset 3px 0 0 var(--info), var(--shadow-card); }
.cc-top { font-size: .78rem; color: var(--muted); }
.cc-srcname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-wants { font-size: 1.14rem; font-weight: 680; line-height: 1.35; }
.cc-wants .cc-bud b { font-family: var(--font-num); font-size: 1.14rem; font-weight: 800; letter-spacing: -.01em; }
.cc-name { font-size: 1rem; font-weight: 650; }
.cc-badges .op-score, .op-score { border-radius: 6px; font-size: .74rem; font-weight: 700; min-height: 22px; }
.op-score-hot { background: var(--bad-bg); color: var(--bad); }
.op-acts .btn.op-call:not(.ghost), .cc .op-phone .btn.op-call { min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 650; font-family: var(--font-num); letter-spacing: .01em; background: var(--bronze); color: var(--on-accent); border-color: var(--bronze); box-shadow: var(--shadow-card); }
.op-acts .btn.op-call:not(.ghost):hover, .cc .op-phone .btn.op-call:hover { background: color-mix(in srgb, var(--bronze) 86%, black); box-shadow: var(--shadow-lift); }
.cc .op-phone .op-msg, .op-acts .btn.op-msg, .op-acts .btn.op-call.ghost, .cc .op-acts > .btn.op-call { min-height: 38px; border-radius: var(--radius-sm); font-size: .86rem; font-weight: 600; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-card); }
.op-acts .btn.op-call.op-link, .cc .op-acts > .btn.op-call.op-link { box-shadow: none; background: transparent; border-color: transparent; color: var(--bronze); }
.cc-flats-h { font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-top: 10px; margin-top: 4px; }
html[lang="hy"] .cc-flats-h { text-transform: none; letter-spacing: 0; }
.cc-flats { margin: 2px 0 0; }
.cc-flat { padding: 5px 8px; margin: 0 -8px; border-radius: 8px; gap: 0 12px; align-items: center; }
.cc-flat:hover { background: var(--soft); }
.cc-flat b { font-family: var(--font-num); font-size: .92rem; font-weight: 750; }
.cc-flat:hover b { text-decoration: none; color: var(--bronze); }
.cc-flat span { font-size: .84rem; }
.cc-flat i { font-style: normal; font-size: .72rem; color: var(--muted); }
.cc-flat.ag span { color: var(--muted); }
.cc-flats-more > summary { font-size: .84rem; min-height: 30px; }
.cc-foot { padding-top: 8px; margin-top: 4px; }
.cc-go { font-weight: 600; color: var(--bronze); }
.cc-det > summary, .lc-more > summary, .cc-flats-more > summary { color: var(--bronze); font-weight: 600; }
.op-raw { background: var(--soft); border: 1px solid var(--line-soft); padding: 10px 12px; border-radius: var(--radius-sm); }

/* ---- lot cards (Best / Matches): price in the display face, premium = a warm left bar */
.op-card.card, .cc-grid > .op-card { padding: 14px 16px 12px; gap: 8px; }
.op-card.card:hover { box-shadow: var(--shadow-lift); }
.lc-row > .op-photo { border-radius: 10px; }
.lc-top .op-price { font-family: var(--font-num); font-size: 1.32rem; font-weight: 800; letter-spacing: -.015em; }
.lc-top .op-price small { font-family: var(--font); font-size: .82rem; font-weight: 500; color: var(--muted); }
.lc-tags .op-rank { width: 22px; height: 22px; border-radius: 50%; background: var(--line-soft); color: var(--muted); font-size: .72rem; font-weight: 700; }
.lc-main .op-meta { font-size: .95rem; font-weight: 600; }
.lc-chip { background: var(--soft); border: 1px solid var(--line-soft); border-radius: 6px; padding: 2px 8px; font-size: .78rem; font-weight: 550; }
.op-card.op-premium { box-shadow: inset 3px 0 0 var(--warn), var(--shadow-card); }
.op-prem-tag { background: var(--warn-bg); color: var(--warn); }
.op-prem-sec { border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); padding: 14px; }
.op-prem-h { font-size: 1.12rem; font-weight: 700; }

/* ---- home («My radar»): a ledger of numbers in the display face, sources with status dots */
.hm-q { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }
html[lang="hy"] .hm-q { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.hm-searches, .hm-sources { padding: 6px 18px; }
.hm-srow { padding: 12px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.hm-srow:last-child { border-bottom: 0; }
a.hm-srow:hover .grow > b { color: var(--bronze); }
.hm-ico { font-size: 20px; width: 30px; flex-basis: 30px; }
.hm-nums b { font-family: var(--font-num); font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.kpi { padding: 16px 18px; }
.kpi .v { font-family: var(--font-num); font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.kpi .l { font-size: .8rem; font-weight: 600; color: var(--muted); }
.hm-price { font-family: var(--font-num); font-weight: 800; }

/* ---- find: same tokens */
.fd-price { font-family: var(--font-num); font-weight: 800; }
.fd-card:hover { box-shadow: var(--shadow-lift); }
.fd-seg.on, .fd-chip.on { box-shadow: var(--shadow-card); }
.fd-open { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.fd-open:hover { background: var(--ink-hover); }
.fd-rank { background: var(--line-soft); }

/* ---- phone: icon tab bar, full-width call, the same rhythm */
@media (max-width: 640px) {
  :root { --hdr: 54px; }
  .wrap { padding: 0 16px; }
  .appbar .appbar-in { min-height: 54px; padding: 0 14px; }
  .appbar .logo { width: 30px; height: 30px; padding: 6px; }
  .appbar .mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; order: 0; flex: none; gap: 2px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,24,40,.06); }
  .appbar .mainnav > a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; border-radius: 12px; border-bottom: 0; margin: 0; font-size: .72rem; font-weight: 550; color: var(--muted); }
  .appbar .mainnav > a .nav-i { width: 22px; height: 22px; opacity: .7; }
  .appbar .mainnav > a[aria-current="page"] { background: var(--sand-bg); color: var(--bronze); font-weight: 700; border-bottom: 0; }
  .appbar .mainnav > a[aria-current="page"] .nav-i { opacity: 1; }
  .appbar .mainnav .nav-l { display: none; } .appbar .mainnav .nav-s { display: inline; }
  .h1 { font-size: 1.38rem; }
  .cc-bar { margin: 0 -16px; padding: 8px 16px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .cc-bar::-webkit-scrollbar { display: none; }
  .cc-bar > * { flex: none; }
  .cc.card { padding: 14px 14px 12px; }
  .cc .op-phone .btn.op-call { min-height: 46px; font-size: 1.02rem; }
  main { padding-bottom: 100px; }
}
.appbar .mainnav .nav-l { display: none; } .appbar .mainnav .nav-s { display: inline; }   /* short tab labels everywhere: the header never wraps */

/* ============================================================ YourRealty Pro (v16): the laptop gets a real app frame.
   >= 1024px: the header becomes a left sidebar (brand, icon tabs with full labels, live + language at the bottom);
   the page content takes the rest. Phones keep the top bar + bottom tab bar. */
@media (min-width: 1024px) {
  :root { --side: 236px; }
  .topbar.appbar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); border-bottom: 0; border-right: 1px solid var(--line); z-index: 30; overflow: hidden; }
  .appbar .appbar-in { flex-direction: column; align-items: stretch; height: 100%; padding: 18px 14px 16px; gap: 18px; min-height: 0; max-width: none; }
  .appbar .brand { padding: 0 6px; min-height: 0; }
  .appbar .brand .pill { display: none; }
  .appbar .mainnav { flex-direction: column; align-items: stretch; gap: 2px; align-self: auto; }
  .appbar .mainnav > a { min-height: 44px; padding: 0 12px; border-radius: 10px; border-bottom: 0; margin: 0; font-size: .95rem; gap: 12px; }
  .appbar .mainnav > a:hover { background: var(--soft); }
  .appbar .mainnav > a[aria-current="page"] { background: var(--ink); color: var(--sand); border-bottom: 0; }
  .appbar .mainnav > a[aria-current="page"] .nav-i { color: var(--sand); opacity: 1; }
  .appbar .mainnav .nav-l { display: inline; } .appbar .mainnav .nav-s { display: none; }
  .appbar .topbar-r { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
  .appbar .live { justify-content: flex-start; padding: 0 6px; }
  .appbar .langs { justify-content: space-between; }
  .appbar .langs a { flex: 1 1 0; justify-content: center; }
  .appbar .logout { padding: 0 6px; }
  main, .footer { margin-left: var(--side); }
  main { padding: 22px 0 60px; }
  .wrap { max-width: 1180px; padding: 0 28px; }
  .cc-bar { top: 0; }
}
@media (min-width: 1024px) {
  .appbar .mainnav .nav-l { display: none; } .appbar .mainnav .nav-s { display: inline; }   /* short labels fit the sidebar */
  .appbar .langs a { padding: 0 4px; min-width: 0; font-size: .74rem; }
  .hm-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---- clients toolbar (v17): four categories + one «Filters» popover */
.cl-bar { align-items: center; }
.cl-cats > a { min-height: calc(var(--ctl) - 6px); }
.cl-more { position: relative; }
.cl-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.cl-more > summary::-webkit-details-marker { display: none; }
.cl-more[open] > summary { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.cl-more-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 320px; max-width: min(92vw, 520px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 14px; display: grid; gap: 12px; }
.cl-more-row { display: grid; gap: 6px; }
.cl-more-l { font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
html[lang="hy"] .cl-more-l { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.cl-more-chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) {
  .cl-bar { -webkit-mask-image: none; mask-image: none; overflow: visible; flex-wrap: wrap; }
  .seg.compact.cl-cats { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; width: 100%; }
  .seg.compact.cl-cats > a { padding: 6px 8px; font-size: .84rem; justify-content: center; min-width: 0; }
  .cl-more-menu { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; max-width: none; }
}
.cl-cats .op-chip-n { margin-left: 6px; opacity: .7; font-weight: 600; }





/* ============================================================ YourRealty «Warm gold» system (v24) — owner: «maybe gold», 2026-11-04
   Friendly and warm, not programmatic: a cream page, white cards, a white header / sidebar with warm charcoal text,
   and gold as the single accent — gold buttons carry dark text (readable), gold underlines the active tab, gold-tinted
   chips show what is selected. Links are a deep gold-brown. Hot = warm orange, owner = olive. Photographs only in
   the hero band. 17px type, Manrope headings, 46px controls, rounded 14px corners everywhere. */
:root {
  --card: #FFFFFF; --soft: #F3EEE3; --line: #E7E0D2; --line-soft: #EFE9DD;
  --text: var(--ink); --muted: #6B6356; --on-accent: #2B251D;
  --accent: var(--bronze); --accent-hover: #B8902E; --accent-soft: #FBF3DC; --accent-ink: #8A6A14;
  --gold: var(--bronze); --gold-soft: #FBF3DC; --gold-ink: #8A6A14;
  --good: #5B7A3A; --good-bg: #EDF2E3; --warn: #B45A12; --warn-bg: #FBE9D7; --bad: #A33A2E; --bad-bg: #F9E5E2;
  --info: #3F6A8A; --info-bg: #E6EEF5; --sand-bg: #F6EBD0; --live: #5B7A3A; --rose-soft: var(--accent-soft);
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow-card: 0 1px 2px rgba(43,37,29,.05), 0 2px 10px rgba(43,37,29,.07);
  --shadow-lift: 0 10px 26px rgba(43,37,29,.13), 0 2px 6px rgba(43,37,29,.06);
  --shadow-pop: 0 20px 48px rgba(43,37,29,.22);
  --font-num: Manrope, Inter, 'Noto Sans Armenian', system-ui, sans-serif;
  --ctl: 44px; --hdr: 62px; --side: 256px; --hero: 210px;
}
:root[data-theme="dark"] { --paper: #15120E; --card: #1E1A14; --soft: #19150F; --line: #332D24; --line-soft: #28231B;
  --text: #F1EADF; --muted: #B1A796; --accent: #E0BE62; --accent-hover: #ECCF80; --accent-soft: #332B17; --accent-ink: #E0BE62; --on-accent: #1A160F;
  --gold-soft: #332B17; --gold-ink: #E0BE62; --good: #A9C98A; --good-bg: #232C1A; --warn: #E8A060; --warn-bg: #3A2A1A;
  --bad: #EBA296; --bad-bg: #3C2420; --info: #9CBBD6; --info-bg: #1C2A36; --sand-bg: #2A2416;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4); --shadow-lift: 0 10px 28px rgba(0,0,0,.5); }
@media (prefers-color-scheme: dark) { :root[data-theme="light"] { --paper: #15120E; --card: #1E1A14; --soft: #19150F; --line: #332D24; --line-soft: #28231B;
  --text: #F1EADF; --muted: #B1A796; --accent: #E0BE62; --accent-hover: #ECCF80; --accent-soft: #332B17; --accent-ink: #E0BE62; --on-accent: #1A160F;
  --gold-soft: #332B17; --gold-ink: #E0BE62; --good: #A9C98A; --good-bg: #232C1A; --warn: #E8A060; --warn-bg: #3A2A1A;
  --bad: #EBA296; --bad-bg: #3C2420; --info: #9CBBD6; --info-bg: #1C2A36; --sand-bg: #2A2416;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4); --shadow-lift: 0 10px 28px rgba(0,0,0,.5); } }

/* ---- type */
body { background: var(--paper); color: var(--text); font-size: 17px; line-height: 1.5; letter-spacing: 0; }
.small { font-size: .92rem; } .tiny { font-size: .82rem; }
.h1, .h2, .h3, .kpi .v, .hm-nums b, .fd-price, .lc-top .op-price, .cc-wants .cc-bud b, .hm-price { font-family: var(--font-num); }
.h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--text); }
.h2 { font-size: 1.3rem; font-weight: 750; } .h3 { font-size: 1.08rem; font-weight: 700; }
.muted { color: var(--muted); }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* ---- hero band */
.bg-photo { display: none; }
.hero-m { display: none !important; }
.hero { position: relative; height: var(--hero); overflow: hidden; background: var(--soft); margin: 0 0 18px; }
.hero .shell-photo { position: absolute; inset: 0; }
.hero .shell-photo-l { position: absolute; inset: 0; background-size: cover; background-position: center 45%; opacity: 0; transition: opacity 1.4s ease; }
.hero .shell-photo-l.on { opacity: 1; }
.hero .shell-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,37,29,.06) 0%, rgba(43,37,29,.16) 55%, rgba(43,37,29,.70) 100%); }
.hero .shell-photo-credit { position: absolute; right: 14px; top: 8px; left: auto; bottom: auto; font-size: .66rem; color: rgba(255,255,255,.75); z-index: 1; pointer-events: none; }
.hero-in { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.hero-t { display: block; color: #fff; font-family: var(--font-num); font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
main .op-hd .h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.op-hd { background: transparent; border: 0; box-shadow: none; padding: 0; margin-bottom: 2px; }
.op-hd .grow > p.muted.small { display: inline; margin: 0; color: var(--muted); font-size: .95rem; background: transparent; padding: 0; }
.op-hd .grow > p.muted.small + p.muted.small::before { content: " · "; color: var(--line); }
.topbar.appbar .shell-photo { display: none; }
header.topbar, main, .footer, .toasts { position: relative; z-index: 1; }

/* ---- surfaces */
.card, .cc.card, .op-card, .kpi, .empty, .callout, .cl-more-menu, .fd-form, .fd-card, .op-prem-sec {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); backdrop-filter: none; -webkit-backdrop-filter: none; }
.card:hover, .cc.card:hover, .op-card.card:hover, .fd-card:hover { box-shadow: var(--shadow-lift); }
.card { padding: 20px 22px; }
.cc-bar { position: sticky; top: var(--hdr); z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); padding: 10px 12px; margin: 0; gap: 8px; backdrop-filter: none; -webkit-backdrop-filter: none; }
.cl-stats, .fd-res-hd, .fd-thought { background: transparent; border: 0; box-shadow: none; padding: 4px 2px; }
.hm-q { display: block; background: transparent; border: 0; box-shadow: none; padding: 0; margin: 14px 0 0; font-size: .95rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.empty { color: var(--muted); padding: 28px; text-align: center; }
.footer { color: var(--muted); font-size: .86rem; line-height: 1.6; background: transparent; border: 0; padding: 24px 20px; text-shadow: none; }
.footer .photo-credit { display: block; margin-top: 4px; }
.muted.tiny { color: var(--muted); text-shadow: none; }
.wrap > p.muted.tiny { background: transparent; padding: 0; }
.callout.warn, .op-nocontact { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

/* ---- controls: gold primary with dark text, hairline secondary, gold-tinted selected */
.btn { border-radius: var(--radius-sm); min-height: 46px; padding: 0 18px; font-size: 1rem; font-weight: 700; box-shadow: none; }
.btn:not(.ghost):not(.sand):not(.danger):not(.good):not(.primary), .btn.primary, .fd-go, .op-acts .btn.op-call:not(.ghost), .cc .op-phone .btn.op-call, .fd-open, .op-tg-primary,
:root[data-theme="dark"] .btn:not(.ghost):not(.sand):not(.danger):not(.good) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn:not(.ghost):not(.sand):not(.danger):not(.good):hover, .fd-go:hover, .op-acts .btn.op-call:not(.ghost):hover, .cc .op-phone .btn.op-call:hover, .fd-open:hover, .op-tg-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-card); }
.btn.ghost, .cc .op-phone .op-msg, .op-acts .btn.op-msg, .op-acts .btn.op-call.ghost, .cc .op-acts > .btn.op-call { background: var(--card); color: var(--text); border: 1.5px solid var(--line); box-shadow: none; min-height: 44px; font-size: .95rem; font-weight: 650; }
.btn.ghost:hover, .op-acts .btn.op-msg:hover, .cc .op-acts > .btn.op-call:hover { border-color: var(--accent); background: var(--accent-soft); }
.cc .op-acts > .btn.op-call.op-tg-primary, .op-acts .btn.op-call.ghost.op-tg-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); min-height: 46px; font-size: 1rem; }
.cc .op-wa, .op-acts .btn.op-wa { color: #1E7A45; } .cc .op-tg, .op-acts .btn.op-tg { color: #1C6EA8; } .cc .op-vb, .op-acts .btn.op-vb { color: #5D43A6; }
.op-acts .btn.op-call.op-link, .cc .op-acts > .btn.op-call.op-link { border-color: transparent; background: transparent; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.op-acts .btn.op-copy { border-style: dashed; }
.op-acts .btn.op-copy.done { border-color: var(--good); color: var(--good); background: var(--good-bg); }
.op-hint { margin: 0; font-size: .9rem; color: var(--muted); }
.btn.sm { min-height: 38px; font-size: .9rem; }
.input, .select, .textarea { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm); min-height: 48px; font-size: 1.02rem; box-shadow: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg.compact { background: var(--soft); border: 1px solid var(--line); padding: 3px; border-radius: var(--radius-sm); box-shadow: none; gap: 2px; }
.seg.compact > a, .seg.compact > button { min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: .95rem; font-weight: 600; color: var(--muted); background: transparent; }
.seg.compact > a:hover, .seg.compact > button:hover { color: var(--text); background: var(--card); }
.seg.compact > a.on, .seg.compact > a[aria-current="true"], .seg.compact > [aria-pressed="true"], .seg.compact > button.on, :root[data-theme="dark"] .seg.compact > a.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.op-chip, .cc-bar .op-chip, .cl-more > summary { min-height: var(--ctl); padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-size: .95rem; font-weight: 600; box-shadow: none; }
.op-chip:hover, .cl-more > summary:hover { border-color: var(--accent); }
.op-chip.on, :root[data-theme="dark"] .op-chip.on, .cl-more[open] > summary { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.op-chip.on .op-chip-n { color: inherit; opacity: .85; }
.cl-cats .op-chip-n { margin-left: 6px; opacity: .75; font-weight: 600; }
.tag { font-size: .8rem; font-weight: 650; padding: 4px 9px; border-radius: 8px; }
.tag.neutral { background: var(--soft); color: var(--muted); }
.tag.owner, .tag.good { background: var(--good-bg); color: var(--good); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.op-score-hot { background: var(--warn-bg); color: var(--warn); }
.op-score-warm { background: var(--accent-soft); color: var(--accent-ink); }
.op-score-low { background: var(--soft); color: var(--muted); }
.new-badge { background: var(--accent); color: var(--on-accent); }
.cc.is-new { box-shadow: inset 4px 0 0 var(--accent), var(--shadow-card); }
.op-vip { box-shadow: inset 4px 0 0 var(--accent), var(--shadow-card); }
.op-reloc { box-shadow: inset 4px 0 0 var(--info), var(--shadow-card); }
.op-card.op-premium { box-shadow: inset 4px 0 0 var(--accent), var(--shadow-card); }
.op-prem-tag { background: var(--gold-soft); color: var(--gold-ink); }

/* ---- client card */
.cc.card { padding: 16px 18px 14px; gap: 9px; }
.cc-top { font-size: .86rem; color: var(--muted); }
.cc-wants { font-size: 1.26rem; font-weight: 700; line-height: 1.35; color: var(--text); }
.cc-wants .cc-bud b { font-size: 1.26rem; font-weight: 800; }
.cc-name { font-size: 1.08rem; font-weight: 700; }
.cc-extra, .cc-tier { font-size: .95rem; }
.cc-flats-h { font-size: .82rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; padding-top: 10px; }
.cc-flat { padding: 6px 8px; margin: 0 -8px; border-radius: 10px; }
.cc-flat:hover { background: var(--accent-soft); }
.cc-flat b { font-family: var(--font-num); font-size: 1.02rem; font-weight: 800; color: var(--text); }
.cc-flat:hover b { color: var(--accent-ink); text-decoration: none; }
.cc-flat span { font-size: .95rem; }
.cc-det > summary, .lc-more > summary, .cc-flats-more > summary, .cc-go { color: var(--accent-ink); font-weight: 650; font-size: .95rem; }
.op-raw { background: var(--soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); font-size: .95rem; }
.lc-top .op-price { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.lc-main .op-meta { font-size: 1.05rem; }
.lc-chip { background: var(--soft); border: 1px solid var(--line-soft); border-radius: 8px; }

/* ---- home */
.kpi .v { font-size: 2.4rem; font-weight: 800; color: var(--text); } .kpi .l { font-size: .9rem; font-weight: 600; color: var(--muted); }
a.kpi:hover { border-color: var(--accent); }
.hm-nums b { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.hm-srow .grow > b { font-size: 1.05rem; }
a.hm-srow:hover .grow > b { color: var(--accent-ink); }

/* ---- find */
.fd-form { padding: 18px 18px 16px; }
.fd-l { font-size: 1.05rem; color: var(--text); }
.fd-seg3, .fd-seg6 { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .fd-seg6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fd-seg { border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius-sm); font-size: 1rem; font-weight: 650; min-height: 50px; color: var(--text); box-shadow: none; }
.fd-seg.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-chip { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-size: .95rem; font-weight: 600; cursor: pointer; user-select: none; min-height: 44px; }
.fd-chip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.fd-map { display: none; }
.ymap { display: grid; position: relative; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 60px; gap: 8px; max-width: 560px; padding: 16px 12px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.ymap-n { position: absolute; top: 6px; right: 10px; font-size: .7rem; font-weight: 800; color: var(--muted); letter-spacing: .1em; }
.ymap-n::after { content: "\2191"; margin-left: 2px; }
.ytile { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 6px; line-height: 1.15; cursor: pointer; user-select: none; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-size: .86rem; font-weight: 650; box-shadow: var(--shadow-card); transition: background .12s, color .12s, border-color .12s; }
.ytile:hover { border-color: var(--accent); }
.ytile.center { border-width: 2px; border-color: var(--accent); }
.ytile.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(201,162,74,.35); }
.ytile input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.fd-price { font-size: 1.55rem; font-weight: 800; color: var(--text); } .fd-meta { font-size: 1.08rem; } .fd-sum { font-size: 1rem; }
.fd-rank { background: var(--soft); }
.fd-more-opts > summary { color: var(--accent-ink); }
.fd-go { min-height: 52px; font-size: 1.08rem; }

/* ---- shell: white header / sidebar, warm text, gold for the active tab, white phone tab bar */
.topbar.appbar { background: var(--card); color: var(--text); border-bottom: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; position: sticky; top: 0; }
.appbar .brand, .appbar .brand b { color: var(--text); }
.appbar .logo { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.appbar .mainnav > a { color: var(--muted); font-size: 1rem; background: transparent; }
.appbar .mainnav > a:hover { color: var(--text); background: var(--soft); }
.appbar .mainnav > a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); background: transparent; }
.appbar .mainnav > a[aria-current="page"] .nav-i { color: var(--accent-ink); }
.appbar .langs { background: var(--soft); border-color: var(--line); }
.appbar .langs a { color: var(--muted); }
.appbar .langs a:hover { color: var(--text); }
.appbar .langs a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-card); }
.appbar .live, .appbar .logout { color: var(--muted); }
.appbar .logout:hover { color: var(--text); }
.appbar .mainnav .nav-l { display: none; } .appbar .mainnav .nav-s { display: inline; }
@media (min-width: 1024px) {
  .topbar.appbar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); border-right: 1px solid var(--line); border-bottom: 0; }
  .topbar.appbar::after { display: none; }
  .appbar .appbar-in { flex-direction: column; align-items: stretch; height: 100%; padding: 20px 14px 18px; gap: 20px; max-width: none; min-height: 0; }
  .appbar .brand b { font-size: 1.2rem; }
  .appbar .mainnav { flex-direction: column; align-items: stretch; gap: 4px; align-self: auto; }
  .appbar .mainnav > a { min-height: 48px; padding: 0 14px; border-radius: 12px; border-bottom: 0; margin: 0; gap: 12px; }
  .appbar .mainnav > a[aria-current="page"] { background: var(--accent-soft); color: var(--text); border-bottom: 0; box-shadow: inset 3px 0 0 var(--accent); }
  .appbar .topbar-r { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
  .appbar .langs { justify-content: space-between; }
  .appbar .langs a { flex: 1 1 0; justify-content: center; padding: 0 4px; }
  main, .footer, .hero { margin-left: var(--side); }
  main { padding: 0 0 70px; }
  .wrap { max-width: 1180px; padding: 0 28px; }
  .cc-bar { top: 0; }
  .hero-in { padding: 0 28px; }
}
@media (max-width: 1023px) { .topbar.appbar { position: sticky; } }
@media (max-width: 640px) {
  :root { --hdr: 58px; --hero: 96px; }   /* a work tool: the photo is a strip with the title, not a quarter of the screen */
  .wrap { padding: 0 14px; }
  .hero { margin-bottom: 10px; }
  .hero-in { padding: 0 14px; bottom: 10px; }
  .hero-t { font-size: 1.3rem; line-height: 1.15; }
  .hero .shell-photo-credit { font-size: .58rem; top: 5px; right: 8px; }
  .appbar .mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; order: 0; flex: none; gap: 2px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(43,37,29,.08); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .appbar .mainnav > a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border-radius: 12px; border-bottom: 0; margin: 0; font-size: .74rem; font-weight: 600; color: var(--muted); }
  .appbar .mainnav > a .nav-i { width: 22px; height: 22px; }
  .appbar .mainnav > a[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
  .appbar .mainnav > a[aria-current="page"] .nav-i { color: var(--accent-ink); }
  .cc-bar { top: calc(var(--hdr) + 6px); margin: 0; overflow: visible; flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
  .cc-bar:has(details[open]) { z-index: 45; }
  .seg.compact.cl-cats { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; width: 100%; }
  .seg.compact.cl-cats > a { white-space: normal; line-height: 1.15; text-align: center; font-size: .84rem; gap: 4px; padding: 6px 8px; justify-content: center; min-width: 0; }
  .seg.compact.cl-cats > a .op-chip-n { font-size: .76rem; margin-left: 3px; }
  .cl-more-menu { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; max-width: none; max-height: calc(100dvh - 220px); overflow-y: auto; }
  .cc.card { padding: 14px 14px 12px; }
  .cc .op-phone .btn.op-call, .cc .op-acts > .btn.op-call.op-tg-primary { min-height: 48px; font-size: 1.05rem; flex: 1 1 100%; justify-content: center; }
  .ymap { grid-auto-rows: 52px; gap: 6px; padding: 14px 8px 8px; max-width: none; }
  .ytile { font-size: .74rem; padding: 2px 3px; }
  main { padding: 0 0 100px; }
  .footer { margin: 16px 14px 0; }
}
@media (prefers-reduced-motion: reduce) { .hero .shell-photo-l { transition: none; } }

/* ---- sign-in (v24): Ararat over Yerevan behind a single white card */
.login-bg { position: fixed; inset: 0; z-index: 0; background: #2B251D; }
.login-bg .shell-photo-l { position: absolute; inset: 0; background-size: cover; background-position: center 40%; opacity: 0; transition: opacity 1.8s ease, transform 16s ease; transform: scale(1.06); }
.login-bg .shell-photo-l.on { opacity: 1; transform: scale(1.0); }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,37,29,.18) 0%, rgba(43,37,29,.22) 50%, rgba(43,37,29,.62) 100%); }
.login-bg .shell-photo-credit { position: absolute; left: 16px; bottom: 10px; z-index: 1; font-size: .7rem; color: rgba(255,255,255,.78); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.login-wrap { position: relative; z-index: 1; min-height: calc(100vh - var(--hdr)); display: grid; place-items: center; padding: 24px 16px 60px; }
.login-card { max-width: 460px; width: 100%; margin: 0; padding: 28px 28px 24px; border-radius: 18px; box-shadow: 0 24px 60px rgba(20,14,8,.35); }
.login-head { display: flex; align-items: center; gap: 14px; }
.login-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; padding: 10px; flex: none; }
.login-mark svg { width: 100%; height: 100%; }
.login-card .eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html[lang="hy"] .login-card .eyebrow { text-transform: none; letter-spacing: 0; }
.login-card .h2 { font-size: 1.5rem; }
.login-tag { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.login-card .btn.lg { background: var(--accent); color: var(--on-accent); border-color: var(--accent); min-height: 52px; font-size: 1.08rem; }
.login-card .btn.lg:hover { background: var(--accent-hover); }
.login-card .field > span { font-size: .9rem; color: var(--text); font-weight: 600; }
body:has(.login-bg) .topbar { background: transparent; border-bottom: 0; position: absolute; left: 0; right: 0; z-index: 2; color: #fff; }
body:has(.login-bg) .topbar .brand, body:has(.login-bg) .topbar .brand b, body:has(.login-bg) .topbar .langs a { color: #fff; }
body:has(.login-bg) .topbar .langs { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
body:has(.login-bg) .topbar .langs a.on { background: #fff; color: var(--text); }
body:has(.login-bg) .footer { display: none; }
@media (max-width: 640px) { .login-wrap { min-height: 100vh; padding: 90px 14px 40px; } .login-card { padding: 22px 20px 20px; } }
body:has(.login-bg) .topbar .pill { display: none; }   /* the brand name is already on the card */

/* ---- sign-in v25 (2026-11-22, owner: «make it astonishing from the first second, fit the phone»):
   frosted-glass card in both themes, the gold button always, feature chips, no photo credit text on the picture */
.login-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }          /* phone: never wider than the screen */
.login-card { min-width: 0; color: #fff; background: rgba(28, 22, 15, .55); border: 1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 30px 80px rgba(10,7,3,.45), inset 0 1px 0 rgba(255,255,255,.12); animation: login-in .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes login-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.login-h { margin: 0; font-family: var(--font-num); font-size: 1.6rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: #fff; overflow-wrap: anywhere; }
.login-mark { background: linear-gradient(140deg, #F2C14E, #D4952B); color: #2B1D08; box-shadow: 0 6px 18px rgba(212,149,43,.45); }
.login-card .login-tag { color: rgba(255,255,255,.86); font-size: 1.02rem; overflow-wrap: anywhere; }
.login-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.login-chips li { padding: 6px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.login-card .field > span { color: rgba(255,255,255,.92); }
.login-card .input { background: rgba(255,255,255,.95); color: #1d1a16; border: 2px solid transparent; min-height: 52px; font-size: 1.1rem; border-radius: 12px; }
.login-card .input:focus { border-color: #F2C14E; box-shadow: 0 0 0 4px rgba(242,193,78,.3); outline: none; }
.login-card .btn.lg.login-go { width: 100%; background: linear-gradient(140deg, #F2C14E, #D4952B) !important; color: #2B1D08 !important; border: 0;   /* beats the theme's .btn:not(…) sand */
  font-weight: 800; border-radius: 12px; box-shadow: 0 10px 24px rgba(212,149,43,.4); transition: transform .15s ease, box-shadow .15s ease; }
.login-card .btn.lg.login-go:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(212,149,43,.5); background: linear-gradient(140deg, #F5CB63, #DA9F38); }
.login-card .login-hint { color: rgba(255,255,255,.7); overflow-wrap: anywhere; }
.login-card .callout { color: var(--text); }
body:has(.login-bg) .topbar .langs a.on { background: #fff; color: #1d1a16; }            /* readable in the dark theme too */
.login-bg .login-credit { left: auto; right: 12px; bottom: 12px; width: 24px; height: 24px; font-size: 0; border-radius: 50%;
  background: rgba(0,0,0,.25); pointer-events: auto; cursor: help; }
.login-bg .login-credit::before { content: "i"; display: grid; place-items: center; height: 100%; font: 600 13px/1 Georgia, serif; color: rgba(255,255,255,.7); }
.login-bg::after { background: linear-gradient(180deg, rgba(20,14,8,.15) 0%, rgba(20,14,8,.25) 45%, rgba(20,14,8,.7) 100%); }
@media (max-width: 640px) {
  .login-wrap { padding: 84px 14px 36px; align-items: end; }
  .login-card { padding: 22px 18px 18px; border-radius: 20px; }
  .login-h { font-size: 1.35rem; }
  .login-bg .shell-photo-l { background-position: 62% 30%; }
}
@media (prefers-reduced-motion: reduce) { .login-card { animation: none; } }

/* ---- Find: the real district map of Yerevan with a pin on each district (static image, no live tiles) */
.ymap { display: none; }
.ymap-real { position: relative; width: 100%; max-width: 760px; aspect-ratio: 1920 / 1632; background-size: cover; background-position: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.ypin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; padding: 5px 11px; border-radius: 999px; border: 2px solid var(--accent); background: rgba(255,255,255,.94); color: var(--text); font-size: .82rem; font-weight: 700; white-space: nowrap; cursor: pointer; user-select: none; box-shadow: 0 2px 8px rgba(43,37,29,.18); transition: background .12s, color .12s, transform .12s; }
.ypin:hover { transform: translate(-50%, -50%) scale(1.06); }
.ypin.on { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(201,162,74,.45); }
.ypin input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.fd-map-cap { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
/* the box around the map holds the zoom button and the name toast; on laptops the pins are name pills as before */
.ymap-box { position: relative; max-width: 760px; }
.ymap-wrap { position: relative; }
.ypin-n { display: none; font-style: normal; font-family: var(--font-num); font-weight: 800; font-size: .92rem; line-height: 1; letter-spacing: 0; }
.ymap-zoom { display: none; position: absolute; right: 10px; bottom: 10px; z-index: 3; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.96); color: var(--text); font: inherit; font-weight: 700; font-size: .84rem; box-shadow: 0 3px 10px rgba(43,37,29,.22); cursor: pointer; }
.ymap-zoom b { font-size: 1.05rem; line-height: 1; }
.ymap-zoom[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ymap-toast { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 24px); padding: 7px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .18s; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.ymap-toast.show { opacity: 1; }
.fd-chip-n { display: none; }
@media (max-width: 640px) {   /* phone: numbered pins (the tile below carries the same number); «zoom» shows the names */
  .ymap-zoom { display: inline-flex; }
  .ymap-box:not(.zoom) .ypin { width: 34px; height: 34px; padding: 0; border-radius: 50%; border-width: 2px; background: rgba(255,255,255,.97); }
  .ymap-box:not(.zoom) .ypin span { display: none; }
  .ymap-box:not(.zoom) .ypin-n { display: block; }
  .ymap-box:not(.zoom) .ypin.on { width: 38px; height: 38px; background: var(--accent); color: var(--on-accent); }
  .ymap-box.zoom .ymap-wrap { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y; max-height: 72vh; border-radius: var(--radius); }
  .ymap-box.zoom .ymap-real { width: 190%; max-width: none; border-radius: 0; }
  .ymap-box.zoom .ypin { font-size: .8rem; padding: 5px 10px; border-width: 2px; }
  .fd-chip-n { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin: 0 7px 0 -2px; border-radius: 50%; background: var(--line-soft); color: var(--text); font-family: var(--font-num); font-size: .78rem; font-weight: 800; line-height: 1; }
  .fd-chip.on .fd-chip-n { background: rgba(255,255,255,.35); color: inherit; }
}

/* lazy list paging: the sentinel is replaced by the next slice when scrolled into view */
.lazy-more{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:8px;padding:18px 0;color:var(--muted,#6b7280);font-size:.9rem;min-height:56px}

/* Find: «Show here» unfolds the post text we already hold (no Telegram widget, instant, every source) */
.fd-post-text { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.5; color: var(--text); max-height: 22em; overflow: auto; }
.fd-show[aria-expanded="true"] { background: var(--soft); }

/* PUBLIC_DEMO: slim top banner (sample data, source link) */
.demo-banner { background: var(--bronze); color: #fff; text-align: center; font-size: .78rem; line-height: 1; padding: 7px 12px; letter-spacing: .02em; }
.demo-banner a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.demo-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 8px; vertical-align: 1px; }

/* ---- photo viewer (Find): full screen, one photo at a time, prev/next, counter */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(12,10,8,.94); display: grid; place-items: center; padding: 48px 8px calc(48px + env(safe-area-inset-bottom)); }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb button { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.9rem; line-height: 1; cursor: pointer; }
.lb button:hover { background: rgba(255,255,255,.26); }
.lb-x { top: 10px; right: 10px; } .lb-p { left: 10px; top: 50%; transform: translateY(-50%); } .lb-n { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-c { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-weight: 600; font-size: .95rem; }
@media (hover: none) { .lb-p, .lb-n { display: none; } }   /* phones: swipe */

/* ---- a gallery that loads from the public post when the card comes into view (public groups) */
.photo-lazy { min-height: 1px; }
.photo-lazy.one { flex: 0 0 auto; width: 1px; }


/* YourRealty brand mark polish (v34) */
.topbar .logo, .appbar .logo {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 3px 10px rgba(43, 37, 29, .18);
  flex: none;
}
.brand b {
  font-weight: 800;
  letter-spacing: -.02em;
}

/* ---- phone tab bar: five tabs always fit the screen (a tab may shrink; a too-long label ends with "…") */
@media (max-width: 640px) {
  .appbar .mainnav { justify-content: stretch; overflow: hidden; }
  .appbar .mainnav > a { min-width: 0; flex: 1 1 0; padding: 4px 1px; }
  .appbar .mainnav > a .nav-s { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; letter-spacing: -.01em; }
  .appbar .mainnav > a .nav-i { flex: none; }
  /* the bar lives inside the sticky header: main (z-index 1, later in the page) painted over the whole header layer */
  .topbar.appbar { z-index: 40; }
}

/* client card: budget against the market median (app/domain/market.py) */
.cc-mkt { margin: 2px 0 0; font-size: .82rem; }
.cc-mkt a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line); }
.cc-mkt a:hover { color: var(--text); }

/* ---- 2026-11-22: phone polish — the photo credit is an ⓘ (tooltip) on every page, never a name over the photo;
   the six bottom tabs keep whole words on a 360–390 px phone */
.hero .shell-photo-credit { font-size: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.28); pointer-events: auto; cursor: help; }
.hero .shell-photo-credit::before { content: "i"; display: grid; place-items: center; height: 100%; font: 600 12px/1 Georgia, serif; color: rgba(255,255,255,.75); }
@media (max-width: 430px) {
  .appbar .mainnav > a .nav-s { font-size: .64rem; letter-spacing: -.02em; text-overflow: clip; }
  .appbar .mainnav { gap: 0; padding-left: 4px; padding-right: 4px; }
}

/* ---- client search box (2026-11-22): one field, full width on a phone */
.cl-search { position: relative; flex: 1 1 260px; min-width: 0; display: flex; }
.cl-search .input { width: 100%; min-height: 44px; padding-right: 36px; border-radius: 12px; }
.cl-search-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; line-height: 1; color: var(--muted); text-decoration: none; }
@media (max-width: 640px) { .cl-search { flex-basis: 100%; order: 3; } }
