/* Team work pages: leaderboard, goals, clients, tasks, shared listings, cooperation, logo, the hand-made listing form.
   Same lacquer and brass as style.css; nothing here defines new colours. */

/* buttons in these components start bare; each rule below dresses them */
.cur-sw button, .status-grid button, .tabs button, .tagbox-t button, .cl-steps button, .cl-today-c, .tk-check, .tk-main, .tk-q-pri, .tk-done-tg, .tk-chip,
.sh-person, .sh-pl, .sh-tpl button, .lg-pos button {
  appearance: none; border: 0; background: none; padding: 0; margin: 0; color: inherit; font: inherit; cursor: pointer; text-align: inherit;
}

/* ---------- rail with more pages: it scrolls on short screens, the phone bar scrolls sideways ---------- */
.nav { overflow-y: auto; overflow-x: hidden; min-height: 0; flex: 1 1 auto; scrollbar-width: none; align-content: start; }
.nav::-webkit-scrollbar { display: none; }
@media (max-height: 860px) and (min-width: 641px) {
  .nav a { height: 40px; }
  .nav a + .nav-group { margin-top: 14px; }
  .nav { gap: 2px; padding-top: 14px; }
}

/* ---------- money: a price with its own $ / ₾ switch ---------- */
.money { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cur-sw { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); line-height: 1; vertical-align: middle; }
.cur-sw button { min-width: 22px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: 11.5px; font-weight: 750; color: var(--ink-3); transition: color var(--t-fast), background var(--t-fast); }
.cur-sw button:hover { color: var(--ink); }
.cur-sw button.on { background: var(--raised); color: var(--gold-text); box-shadow: 0 0 0 1px var(--line-2) inset; }
.cur-sw button:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.price .money { gap: 10px; }
.price .cur-sw { font-size: initial; }
.hm-price .money { gap: 6px; }
.hm-price .cur-sw button { min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 3px; }

/* ---------- listing statuses ---------- */
.status-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.status-grid button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); font-size: 13px; font-weight: 650; transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.status-grid button i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.status-grid button:hover { color: var(--ink); border-color: var(--ink-3); }
.status-grid button:active { transform: scale(.96); }
.status-grid button.on { background: var(--raised); color: var(--ink); border-color: var(--gold); box-shadow: 0 0 0 3px var(--accent-ring); }
.tag.st-cooperating { color: var(--cobalt-hi); }
.tag.st-rented, .tag.st-sold { color: var(--terra-text); }
.tag.st-rerent, .tag.st-warranty { color: var(--gold-text); }
.tag.st-archived { color: var(--ink-3); }
.shared-from { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.shared-from .icon { width: 15px; height: 15px; color: var(--gold-text); }

/* ---------- shared bits ---------- */
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); user-select: none; }
.check input { appearance: none; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--field); display: grid; place-items: center; transition: background var(--t-fast), border-color var(--t-fast); cursor: pointer; }
.check input::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--t-fast) var(--ease); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.check span small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; }
.switch-row b { display: block; font-size: 14.5px; }
.switch-row small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { display: block; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); transition: background var(--t) var(--ease); position: relative; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform var(--t) var(--ease); }
.switch input:checked + i { background: var(--gold); }
.switch input:checked + i::after { transform: translateX(18px); background: #140f04; }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--accent-ring); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px; color: var(--ink-3); font-weight: 650; font-size: 14px; white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
.tabs button .icon { width: 16px; height: 16px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--raised); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.tabs button b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--gold); color: #140f04; font-size: 11.5px; font-weight: 800; }
.tabs button b:empty { display: none; }
.tagbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 6px 8px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line-2); cursor: text; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.tagbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.tagbox input { flex: 1; min-width: 140px; height: 32px; border: 0; background: none; outline: none; font-size: 14.5px; padding: 0 4px; }
.tagbox-t { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 4px 0 10px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; }
.tagbox-t button { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; color: var(--ink-3); }
.tagbox-t button:hover { color: var(--ink); background: var(--panel-2); }
.tagbox-t .icon { width: 13px; height: 13px; }
.is-sure { color: var(--terra-text) !important; }

/* side sheet */
dialog.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: -24px 0 48px -20px rgba(0,0,0,.6); animation: sheet-in var(--t) var(--ease) both; }
dialog.sheet.sheet-wide { width: min(760px, 100vw); }
dialog.sheet::backdrop { background: var(--scrim); animation: fade-in var(--t) ease both; }
dialog.sheet.closing { animation: sheet-out 200ms var(--ease-in) both; }
dialog.sheet.closing::backdrop { opacity: 0; transition: opacity 200ms; }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateX(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet-in { display: flex; flex-direction: column; height: 100%; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px 22px 32px; overscroll-behavior: contain; }

/* a listing in one line */
.mini-l { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-width: 0; }
.mini-thumb { width: 64px; height: 50px; border-radius: 8px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; color: var(--ink-3); }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-txt { display: grid; gap: 2px; min-width: 0; }
.mini-top { display: flex; align-items: center; gap: 8px; }
.mini-top .tag { height: 19px; font-size: 11px; padding: 0 6px; }
.mini-title { font-weight: 650; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-txt small { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-txt small .icon { width: 13px; height: 13px; flex: none; }
.mini-price { display: grid; justify-items: end; gap: 4px; font-weight: 750; font-size: 14.5px; }

/* ---------- leaderboard ---------- */
.lb { display: grid; gap: 20px; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lb-team { display: flex; align-items: center; gap: 14px; }
.lb-team-mark { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--raised), var(--panel)); border: 1px solid var(--line-2); color: var(--gold-text); }
.lb-team strong { display: block; font-size: 18px; letter-spacing: -.01em; }
.lb-team small { color: var(--ink-3); font-size: 13px; }
.lb-note { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: var(--r); background: var(--panel); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 14px; }
.lb-note .icon { color: var(--gold-text); flex: none; }
.lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; list-style: none; padding: 0; margin: 0; max-width: 820px; width: 100%; justify-self: center; }
.lb-p { position: relative; display: grid; justify-items: center; gap: 8px; padding: 22px 14px 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); text-align: center; animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(200ms + var(--k) * 90ms); }
.lb-p.lb-p1 { padding-top: 30px; padding-bottom: 26px; border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%), var(--panel); }
.lb-p.is-me { box-shadow: 0 0 0 2px var(--accent-ring); }
.lb-p .avatar { box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line-2); }
.lb-p1 .avatar { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--gold); }
.lb-medal { position: absolute; top: 12px; left: 12px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--raised); color: var(--ink-2); border: 1px solid var(--line-2); }
.lb-p1 .lb-medal { background: var(--gold); color: #140f04; border-color: var(--gold); }
.lb-p2 .lb-medal { background: var(--cobalt-hi); color: #0a0a0a; border-color: var(--cobalt-hi); }
.lb-p3 .lb-medal { background: #b07a4a; color: #140f04; border-color: #b07a4a; }
.lb-p strong { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-p strong em { font-style: normal; font-size: 11.5px; color: var(--gold-text); font-weight: 700; }
.lb-p > b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.lb-p1 > b { font-size: 36px; color: var(--gold-text); }
.lb-p > b small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; margin-top: 4px; }
.lb-p-stats { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.lb-p-stats span { display: inline-flex; align-items: center; gap: 4px; }
.lb-p-stats .icon { width: 13px; height: 13px; }
.lb-empty { visibility: hidden; }
.lb-table-wrap { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 650; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table .num { text-align: right; }
.lb-table td.zero { color: var(--ink-3); }
.lb-table tr.is-me td { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.lb-th { display: inline-flex; align-items: center; gap: 6px; }
.lb-th .icon { width: 14px; height: 14px; }
.lb-rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-weight: 800; font-size: 13px; background: var(--panel-2); color: var(--ink-2); }
.lb-rank.r1 { background: var(--gold); color: #140f04; }
.lb-who { display: flex; align-items: center; gap: 10px; }
.lb-who b { display: block; font-weight: 650; }
.lb-who small { font-size: 12px; color: var(--ink-3); }
.lb-score { font-weight: 800; font-size: 16px; }
.lb-tr { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; font-size: 12px; font-weight: 700; }
.lb-tr .icon { width: 14px; height: 14px; }
.lb-tr.up { color: var(--teal-text); }
.lb-tr.down { color: var(--terra-text); }
.lb-tr.flat { color: var(--ink-3); }
.lb-points { padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.lb-points h3 { font-size: 14px; margin-bottom: 12px; }
.lb-points ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 20px; }
.lb-points li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.lb-points li .icon { width: 16px; height: 16px; color: var(--ink-3); }
.lb-points li b { margin-left: auto; color: var(--gold-text); }
@media (max-width: 640px) {
  .lb-podium { gap: 8px; }
  .lb-p { padding: 16px 6px 12px; }
  .lb-p > b { font-size: 22px; }
  .lb-p1 > b { font-size: 26px; }
  .lb-p-stats { display: none; }
  .lb-medal { top: 6px; left: 6px; width: 22px; height: 22px; font-size: 11px; }
  .lb-table th, .lb-table td { padding: 10px 8px; }
  .lb-th span { display: none; }
}

/* ---------- goals ---------- */
.gl { grid-column: 1 / -1; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); display: grid; gap: 14px; }
.gl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gl-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.gl-head h2 .icon { color: var(--gold-text); }
.gl-head p { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.gl-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.gl-card { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.gl-card.is-done { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
.gl-ring-wrap { position: relative; width: 54px; height: 54px; display: grid; place-items: center; }
.gl-ring-wrap > span { position: absolute; font-size: 11.5px; font-weight: 800; color: var(--ink-2); }
.gl-ring { width: 54px; height: 54px; transform: rotate(-90deg); }
.gl-ring circle { fill: none; stroke-width: 5; }
.gl-ring-bg { stroke: var(--line-2); }
.gl-ring-fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 900ms var(--ease); }
.is-done .gl-ring-fg { stroke: var(--teal); }
.gl-txt { display: grid; gap: 2px; min-width: 0; }
.gl-txt b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.gl-txt b small { font-size: 13px; color: var(--ink-3); font-weight: 650; }
.gl-txt > span { font-size: 13.5px; font-weight: 600; }
.gl-txt > small { font-size: 12px; color: var(--ink-3); }
.gl-txt em { font-style: normal; color: var(--gold-text); }
.gl-empty { display: grid; gap: 10px; }
.gl-empty p { font-size: 14px; color: var(--ink-2); }
.gl-empty .chips button { height: 34px; gap: 6px; }
.gl-empty .chips .icon { width: 14px; height: 14px; }
.gl-form { display: grid; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); animation: rise var(--t) var(--ease) both; }
.gl-form .field { margin: 0; }
.gl-form-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; }
.gl-num { width: 160px; }
.gl-num input { text-align: center; font-weight: 750; -moz-appearance: textfield; }
.gl-num input::-webkit-inner-spin-button { display: none; }
.gl-num .icon-btn { font-size: 18px; font-weight: 700; }
.gl-hint { font-size: 12.5px; color: var(--ink-3); }
.gl-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gl-form-btns { display: flex; gap: 8px; }

/* ---------- admin: the rate ---------- */
.fx-panel { margin-top: 18px; }
.fx-now b { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.fx-now small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.fx-facts { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.fx-facts li { display: flex; align-items: center; gap: 8px; }
.fx-facts i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.fx-facts li.ok i { background: var(--teal); }
.fx-facts li.bad { color: var(--terra-text); }
.fx-facts li.bad i { background: var(--terra); }
.fx-manual-on { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--gold-text); margin-bottom: 12px; }
.fx-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-top: 12px; }
.fx-form .field { margin: 0; min-width: 180px; }
.fx-form .hint { display: block; margin-top: 4px; font-size: 12px; }

/* ---------- clients ---------- */
.cl { display: grid; gap: 16px; min-width: 0; }
.cl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cl-search { flex: 1 1 240px; min-width: 200px; }
.cl-pri button i { width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.cl-bar select { width: auto; min-width: 140px; }
.cl-stats { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.cl-stats:empty { display: none; }
.cl-stat { display: grid; gap: 2px; padding: 12px 16px; min-width: 120px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.cl-stat b { font-size: 22px; font-weight: 800; }
.cl-stat span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.cl-stat span i { width: 8px; height: 8px; border-radius: 50%; }
.cl-today { flex: 1 1 320px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--gold) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); }
.cl-today-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--gold-text); margin-right: 4px; }
.cl-today-t .icon { width: 15px; height: 15px; }
.cl-today-c { display: inline-flex; align-items: baseline; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-2); font-weight: 650; font-size: 13px; }
.cl-today-c small { color: var(--ink-3); font-weight: 600; font-size: 11.5px; }
.cl-today-c.late small { color: var(--terra-text); }
.cl-today-c:hover { border-color: var(--gold); }
.cl-board { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; scroll-snap-type: x proximity; }
.cl-col { display: grid; grid-template-rows: auto 1fr; min-height: 320px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); scroll-snap-align: start; transition: border-color var(--t-fast), background var(--t-fast); }
.cl-col.over { border-color: var(--s); background: color-mix(in srgb, var(--s) 6%, var(--panel)); }
.cl-col header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13.5px; }
.cl-col header i { width: 9px; height: 9px; border-radius: 3px; background: var(--s); }
.cl-col header b { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.cl-col-body { display: grid; align-content: start; gap: 8px; padding: 10px; min-height: 120px; }
.cl-col-empty { padding: 26px 10px; text-align: center; font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r); }
.cl-card { position: relative; display: grid; gap: 6px; padding: 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); cursor: grab; overflow: hidden; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast); animation: rise var(--t) var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.cl-card-top b::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--p); vertical-align: 1px; }
.cl-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.cl-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.cl-card.dragging { opacity: .45; cursor: grabbing; }
.cl-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-card-top b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-card-top .tag { height: 19px; font-size: 11px; padding: 0 6px; }
.cl-budget { font-weight: 750; font-size: 14px; color: var(--gold-text); }
.cl-want { font-size: 12.5px; color: var(--ink-2); }
.cl-places { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.cl-places .icon { width: 13px; height: 13px; flex: none; }
.cl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.cl-due, .cl-m { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.cl-due .icon, .cl-m .icon { width: 13px; height: 13px; }
.cl-due.today { color: var(--gold-text); }
.cl-due.late { color: var(--terra-text); }
.cl-m { color: var(--teal-text); }
.cl-empty-cta { display: grid; place-items: center; margin-top: -24px; }
.cl-table-wrap { overflow-x: auto; }
.cl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cl-table th { text-align: left; padding: 12px 14px; font-size: 12px; color: var(--ink-3); font-weight: 650; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cl-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cl-table tbody tr { cursor: pointer; transition: background var(--t-fast); }
.cl-table tbody tr:hover, .cl-table tbody tr:focus-visible { background: var(--panel-2); outline: none; }
.cl-table .num { text-align: right; }
.cl-tname { display: flex; align-items: center; gap: 10px; }
.cl-tname i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cl-tname b { display: block; }
.cl-tname small { color: var(--ink-3); font-size: 12px; }
/* one client */
.cl-sh-top { display: grid; gap: 14px; }
.cl-contact { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-contact:empty { display: none; }
.cl-steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; overflow-x: auto; scrollbar-width: none; }
.cl-steps li { flex: 1; min-width: 96px; }
.cl-steps button { width: 100%; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-3); font-size: 12.5px; font-weight: 650; position: relative; overflow: hidden; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); white-space: nowrap; }
.cl-steps button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--s); transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease); }
.cl-steps button.past { color: var(--ink-2); }
.cl-steps button.past::after { transform: scaleX(1); opacity: .45; }
.cl-steps button.on { color: var(--ink); border-color: var(--s); background: color-mix(in srgb, var(--s) 12%, var(--panel-2)); }
.cl-steps button.on::after { transform: scaleX(1); }
.cl-steps button:hover { color: var(--ink); }
.cl-tabs { margin-bottom: 16px; width: 100%; }
.cl-tabs button { flex: 1; justify-content: center; }
.cl-tabs button b { background: var(--raised); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2) inset; }
.cl-tabs button.on b { background: var(--gold); color: #140f04; box-shadow: none; }
.cl-form fieldset { border: 0; padding: 0; margin: 0 0 22px; display: grid; gap: 0; }
.cl-form legend { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 14px; color: var(--ink); padding: 0 0 4px; width: 100%; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.cl-form legend .icon { width: 16px; height: 16px; color: var(--gold-text); }
.cl-form .field { margin-top: 14px; }
.cl-form .field-pair { margin-top: 0; }
.cl-range { display: flex; align-items: center; gap: 8px; }
.cl-range .control { flex: 1; min-width: 0; }
.cl-range > span { color: var(--ink-3); }
.cl-range input { min-width: 0; }
.cl-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cl-checks { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 22px; margin-top: 14px; }
.cl-checks .cl-bed { margin-top: 0; margin-left: auto; width: 180px; }
.cl-form-foot { position: sticky; bottom: -32px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0 6px; background: linear-gradient(transparent, var(--panel) 30%); }
.cl-pane-sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 12px; }
.cl-matches { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cl-matches > li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); animation: rise var(--t) var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.cl-mthumb { width: 84px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--raised); display: block; }
.cl-mthumb img { width: 100%; height: 100%; object-fit: cover; }
.cl-mbody { display: grid; gap: 3px; min-width: 0; }
.cl-mbody > b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-mtop { display: flex; align-items: center; gap: 8px; }
.cl-mtop a { text-decoration: none; }
.cl-mtop small { color: var(--ink-3); font-size: 12px; }
.cl-fit { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 750; color: var(--teal-text); background: color-mix(in srgb, var(--teal) calc(var(--f) * 22%), transparent); border: 1px solid color-mix(in srgb, var(--teal) 40%, transparent); }
.cl-mprice { font-weight: 750; font-size: 14px; }
.cl-checks-row { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; }
.cl-checks-row span { display: inline-flex; align-items: center; gap: 3px; }
.cl-checks-row .icon { width: 12px; height: 12px; }
.cl-checks-row .ok { color: var(--teal-text); }
.cl-checks-row .no { color: var(--ink-3); text-decoration: line-through; }
.cl-mact { display: flex; align-items: center; gap: 6px; }
.cl-react button { height: 28px; font-size: 12px; padding: 0 9px; }
.cl-nomatch { padding: 22px; border-radius: var(--r); border: 1px dashed var(--line-2); text-align: center; color: var(--ink-2); font-size: 14px; }
.cl-ask { margin-top: 14px; display: flex; justify-content: flex-end; }
.cl-log-new { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 16px; }
.cl-log-new textarea { min-height: 64px; }
.cl-log-new .btn { justify-self: end; }
.cl-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; position: relative; }
.cl-log::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.cl-log li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; }
.cl-log-i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink-3); position: relative; }
.cl-log-i .icon { width: 15px; height: 15px; }
.cl-log li.k-call .cl-log-i, .cl-log li.k-meeting .cl-log-i { color: var(--gold-text); }
.cl-log li.k-stage .cl-log-i { color: var(--teal-text); }
.cl-log p { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-log small { font-size: 12px; color: var(--ink-3); }
.cl-log .icon-btn { opacity: 0; transition: opacity var(--t-fast); }
.cl-log li:hover .icon-btn, .cl-log .icon-btn:focus-visible { opacity: 1; }
@media (max-width: 760px) {
  .cl-grid3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cl-checks .cl-bed { margin-left: 0; width: 100%; }
  .cl-matches > li { grid-template-columns: 64px minmax(0, 1fr); }
  .cl-mthumb { width: 64px; height: 52px; }
  .cl-mact { grid-column: 1 / -1; justify-content: flex-end; }
  .cl-board { grid-template-columns: repeat(6, minmax(78vw, 1fr)); }
  .cl-bar .seg span { display: none; }
}

/* ---------- tasks ---------- */
.tk { display: grid; gap: 14px; min-width: 0; }
.tk-quick { display: flex; flex-direction: row; align-items: center; text-align: left; gap: 8px; padding: 8px 8px 8px 14px; flex-wrap: wrap; }
.tk-quick-i { color: var(--ink-3); display: grid; }
.tk-quick input[name=title] { flex: 1 1 220px; min-width: 0; height: 40px; border: 0; background: none; outline: none; font-size: 15px; }
.tk-q-opt { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-3); }
.tk-q-opt .icon { width: 15px; height: 15px; flex: none; }
.tk-q-opt select, .tk-q-opt input { height: 32px; border: 0; background-color: transparent; padding: 0 2px; font-size: 13px; color: var(--ink); box-shadow: none; width: auto; min-width: 0; }
.tk-q-opt select { padding-right: 26px; max-width: 170px; background-position: right 4px center; }
.tk-q-opt select:focus, .tk-q-opt input:focus { box-shadow: none; }
.tk-q-opt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.tk-q-pri { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-3); transition: color var(--t-fast), border-color var(--t-fast); }
.tk-q-pri[data-pri=high] { color: var(--terra-text); border-color: color-mix(in srgb, var(--terra) 50%, var(--line)); }
.tk-q-pri[data-pri=low] { color: var(--c2); }
.tk-group { display: grid; gap: 6px; }
.tk-group h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); font-weight: 700; padding: 6px 4px 2px; }
.tk-group h3 b { font-size: 12px; color: var(--ink-3); }
.tk-group.g-overdue h3 { color: var(--terra-text); }
.tk-group.g-today h3 { color: var(--gold-text); }
.tk-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tk-done-tg { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 700; font-size: 13px; }
.tk-done-tg .icon { width: 15px; height: 15px; }
.tk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color var(--t-fast), opacity var(--t) var(--ease), transform var(--t) var(--ease); animation: rise var(--t) var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.tk-row:hover { border-color: var(--line-2); }
.tk-row.p-high { border-color: color-mix(in srgb, var(--terra) 40%, var(--line)); }
.tk-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease); }
.tk-check .icon { width: 14px; height: 14px; stroke-width: 3; }
.tk-check:hover:not(:disabled) { border-color: var(--teal); color: var(--teal-text); }
.tk-check:active:not(:disabled) { transform: scale(.88); }
.tk-check:disabled { opacity: .4; cursor: not-allowed; }
.tk-row.is-done .tk-check { background: var(--teal); border-color: var(--teal); color: #04140f; }
.tk-row.is-done .tk-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.tk-row.ticking.is-done { opacity: .55; }
.tk-main { display: grid; gap: 4px; text-align: left; min-width: 0; }
.tk-title { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-3); }
.tk-meta:empty { display: none; }
.tk-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.tk-meta .icon { width: 13px; height: 13px; }
.tk-due.today { color: var(--gold-text); font-weight: 650; }
.tk-due.late { color: var(--terra-text); font-weight: 650; }
.tk-hi { color: var(--terra-text); font-weight: 650; }
.tk-link { color: var(--ink-2); }
.tk-who { display: grid; }
.tk-allclear { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 24px; color: var(--teal-text); font-weight: 650; }
.tk-cal { padding: 0; overflow: hidden; }
.tk-cal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tk-cal-bar h3 { font-size: 15px; min-width: 160px; text-align: center; text-transform: capitalize; }
.tk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tk-cell { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 3px; min-width: 0; }
.tk-cell:nth-child(7n) { border-right: 0; }
.tk-cell > span { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.tk-cell.is-out { background: color-mix(in srgb, var(--ground) 40%, transparent); }
.tk-cell.is-out > span { opacity: .5; }
.tk-cell.is-today > span { color: #140f04; background: var(--gold); border-radius: 5px; padding: 0 5px; justify-self: start; }
.tk-cell small { font-size: 11px; color: var(--ink-3); }
.tk-chip { text-align: left; font-size: 11.5px; font-weight: 600; padding: 3px 6px; border-radius: 5px; background: var(--panel-2); border-left: 3px solid var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-chip.p-high { border-left-color: var(--terra); }
.tk-chip.p-low { border-left-color: var(--c2); }
.tk-chip.is-done { opacity: .5; text-decoration: line-through; }
.tk-chip:hover { background: var(--raised); }
.tk-sh-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-sh-who { display: inline-flex; align-items: center; gap: 8px; }
.tk-sh-who small { color: var(--ink-3); font-size: 12.5px; }
.tk-ro { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r); background: var(--panel-2); font-size: 13px; color: var(--ink-2); }
.tk-ro .icon { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ink-3); }
.tk-form .field { margin-top: 14px; }
.tk-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.tk-steps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.tk-steps li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel-2); }
.tk-steps li.is-done .check span { color: var(--ink-3); text-decoration: line-through; }
.tk-step-add { margin-top: 6px; }
.tk-form-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.tk-comments { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.tk-comments h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; }
.tk-comments h3 .icon { width: 16px; height: 16px; color: var(--ink-3); }
.tk-comments ol { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.tk-comments li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.tk-comments li b { font-size: 13px; }
.tk-comments li small { font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.tk-comments li p { font-size: 14px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-cm-new { display: grid; gap: 8px; }
.tk-cm-new .btn { justify-self: end; }
@media (max-width: 640px) {
  .tk-q-opt select { max-width: 110px; }
  .tk-form-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-cell { min-height: 72px; padding: 4px; }
  .tk-chip { font-size: 0; height: 6px; padding: 0; border-left-width: 0; background: var(--gold); }
  .tk-chip.p-high { background: var(--terra); }
  .tk-tabs button span { display: none; }
}

/* ---------- shared listings ---------- */
.sh { display: grid; gap: 16px; min-width: 0; }
.sh-list { display: grid; gap: 12px; }
.sh-card { padding: 16px 18px; display: grid; gap: 12px; animation: rise var(--t) var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.sh-card.is-new { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); box-shadow: 0 0 0 3px var(--accent-ring); }
.sh-head { display: flex; align-items: center; gap: 10px; }
.sh-head b { display: block; font-size: 14.5px; }
.sh-head small { font-size: 12.5px; color: var(--ink-3); }
.sh-head .tag-new { margin-left: auto; }
.sh-msg { position: relative; padding: 10px 14px; border-radius: 4px 12px 12px 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; }
.sh-gone { display: flex; align-items: center; gap: 8px; color: var(--terra-text); font-size: 13px; }
.sh-l { display: block; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
a.sh-l[href]:hover { border-color: var(--line-2); background: var(--panel-2); }
.sh-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sh-x { margin-left: auto; }
.sh-steps { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--ink-3); }
.sh-steps li { display: inline-flex; align-items: center; gap: 6px; }
.sh-steps li i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-2); }
.sh-steps li.on { color: var(--ink); font-weight: 650; }
.sh-steps li.on i { background: var(--teal); border-color: var(--teal); }
.sh-new { display: grid; gap: 14px; }
.sh-step { padding: 18px 20px; display: grid; gap: 12px; }
.sh-step h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.sh-n { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--gold); color: #140f04; font-size: 12.5px; font-weight: 800; }
.sh-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sh-person { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); text-align: center; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease); }
.sh-person:hover { border-color: var(--line-2); }
.sh-person:active { transform: scale(.97); }
.sh-person b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-person small { font-size: 12px; color: var(--ink-3); }
.sh-person.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--panel-2)); }
.sh-tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #140f04; transform: scale(0); transition: transform var(--t-fast) var(--ease); }
.sh-tick .icon { width: 12px; height: 12px; stroke-width: 3; }
.sh-person.on .sh-tick { transform: scale(1); }
.sh-all-i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--ink-2); }
.sh-pick { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.sh-pl { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); transition: border-color var(--t-fast), background var(--t-fast); }
.sh-pl:hover { border-color: var(--line-2); }
.sh-pl.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--panel-2)); box-shadow: 0 0 0 3px var(--accent-ring); }
.sh-tpl { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-tpl button { text-align: left; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); line-height: 1.4; max-width: 100%; transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease); }
.sh-tpl button:hover { border-color: var(--gold); color: var(--ink); }
.sh-tpl button:active { transform: scale(.98); }
.sh-tpl button.used { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); color: var(--gold-text); }
.sh-send { display: flex; justify-content: flex-end; }

/* ---------- cooperation ---------- */
.cp { display: grid; gap: 16px; min-width: 0; }
.cp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cp-bar .chips button i { width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.cp-bar .chips button b { margin-left: 6px; font-size: 11.5px; color: var(--ink-3); }
.cp-bar .chips button.on b { color: inherit; }
.cp-list { display: grid; gap: 12px; }
.cp-card { padding: 0; display: grid; overflow: hidden; animation: rise var(--t) var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.cp-card.is-urgent { border-color: color-mix(in srgb, var(--terra) 45%, var(--line)); }
.cp-card.is-closed { opacity: .75; }
.cp-card.is-focus { box-shadow: 0 0 0 3px var(--accent-ring); }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.cp-head b { display: block; font-size: 14.5px; }
.cp-head b em { font-style: normal; font-size: 11.5px; color: var(--gold-text); }
.cp-head small { font-size: 12.5px; color: var(--ink-3); }
.cp-tags { margin-left: auto; display: flex; gap: 6px; }
.cp-what { padding: 12px 18px 16px; display: grid; gap: 8px; }
.cp-what > small { font-size: 12px; color: var(--ink-3); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.cp-what h3 { font-size: 19px; letter-spacing: -.01em; }
.cp-budget { font-size: 16px; font-weight: 750; color: var(--gold-text); }
.cp-places { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.cp-places .icon { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.cp-needs { display: flex; flex-wrap: wrap; gap: 4px; }
.cp-note { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; padding: 10px 12px; border-radius: var(--r); background: var(--panel-2); }
.cp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-3); }
.cp-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cp-meta .icon { width: 14px; height: 14px; }
.cp-replies { padding: 14px 18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--ground) 35%, var(--panel)); display: grid; gap: 10px; }
.cp-replies h4 { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.cp-reply { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.cp-reply.v-good { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
.cp-reply.v-no { opacity: .65; }
.cp-reply-by { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cp-reply-by small { color: var(--ink-3); font-size: 12px; }
.cp-reply-by .tag { margin-left: auto; }
.cp-reply > p { font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }
.cp-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--gold-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-reply-act { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.cp-reply-act:empty { display: none; }
.cp-reply-act .btn.on { color: var(--ink); background: var(--raised); }
.cp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.cp-own { display: flex; align-items: center; gap: 6px; }
.cp-hint { margin-left: 4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--teal); color: #04140f; font-size: 11.5px; font-weight: 800; }
.cp-reply-form { display: grid; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2); animation: rise var(--t) var(--ease) both; }
.cp-pick { max-height: 280px; }
.cp-reply-foot { display: flex; justify-content: flex-end; gap: 8px; }
.cp-urgent { margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); width: 100%; }
.cp-form input[type=range] { width: 100%; accent-color: var(--gold); margin-top: 12px; }

/* ---------- logo on photos ---------- */
.lg-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); grid-template-areas: 'up prev' 'how prev'; gap: 16px; align-items: start; }
.lg-up { grid-area: up; }
.lg-prev { grid-area: prev; }
.lg-how { grid-area: how; padding: 16px 18px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); }
.lg-how h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; }
.lg-how h3 .icon { color: var(--gold-text); }
.lg-how ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.lg-drop { display: grid; justify-items: center; gap: 8px; padding: 34px 18px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); background: var(--panel-2); text-align: center; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.lg-drop:hover, .lg-drop.over, .lg-drop:focus-visible { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 6%, var(--panel-2)); outline: none; }
.lg-drop > .icon { width: 28px; height: 28px; color: var(--gold-text); }
.lg-drop b { font-size: 15px; }
.lg-drop small { font-size: 12.5px; color: var(--ink-3); max-width: 260px; }
/* the checkerboard shows what is see-through */
.lg-check { display: grid; place-items: center; padding: 16px; min-height: 120px; border-radius: var(--r); border: 1px solid var(--line);
  background-color: #d8d8d8; background-image: linear-gradient(45deg, #b9b9b9 25%, transparent 25%), linear-gradient(-45deg, #b9b9b9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #b9b9b9 75%), linear-gradient(-45deg, transparent 75%, #b9b9b9 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.lg-check img { max-width: 100%; max-height: 140px; object-fit: contain; }
.lg-current { display: grid; gap: 12px; }
.lg-cur-act { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-ok { display: flex; align-items: center; gap: 8px; color: var(--teal-text); font-weight: 650; font-size: 14px; margin-bottom: 12px; }
.lg-warn { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: rgba(212, 172, 85, .08); border: 1px solid rgba(212, 172, 85, .4); margin-bottom: 12px; }
.lg-warn > .icon { color: var(--gold-text); flex: none; margin-top: 2px; }
.lg-warn b { font-size: 14px; }
.lg-warn p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.lg-ba { display: grid; gap: 10px; }
.lg-ba.two { grid-template-columns: 1fr 1fr; }
.lg-ba figure { margin: 0; display: grid; gap: 6px; }
.lg-ba figcaption { font-size: 12px; color: var(--ink-3); text-align: center; font-weight: 650; }
.lg-strength { margin-top: 12px; }
.lg-strength input { width: 100%; accent-color: var(--gold); }
.lg-draft-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.lg-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--teal-text); font-weight: 650; }
.lg-saved .icon { width: 14px; height: 14px; }
.lg-saved.pop { animation: pop 400ms var(--ease); }
.lg-stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--panel-2); container-type: inline-size; }
.lg-photo, .lg-photo img, .lg-photo canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lg-mark { position: absolute; width: var(--lg-w, 18%); height: auto; opacity: var(--lg-o, .7); transition: all var(--t) var(--ease); pointer-events: none; --m: calc(var(--lg-m, 4) * 0.75cqw); }
.lg-stage[data-pos^=t] .lg-mark { top: var(--m); }
.lg-stage[data-pos^=b] .lg-mark { bottom: var(--m); }
.lg-stage[data-pos^=m] .lg-mark { top: 50%; translate: 0 -50%; }
.lg-stage[data-pos$=l] .lg-mark { left: var(--m); }
.lg-stage[data-pos$=r] .lg-mark { right: var(--m); }
.lg-stage[data-pos$=c] .lg-mark { left: 50%; translate: -50% 0; }
.lg-stage[data-pos=mc] .lg-mark { translate: -50% -50%; }
.lg-ctrls { display: grid; gap: 16px; margin-top: 16px; }
.lg-ctrl-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.lg-pos { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 26px); gap: 4px; padding: 6px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); margin-top: 8px; width: max-content; }
.lg-pos button { border-radius: 5px; display: grid; place-items: center; border: 1px solid transparent; transition: background var(--t-fast); }
.lg-pos button i { width: 8px; height: 8px; border-radius: 2px; background: var(--line-2); transition: background var(--t-fast), transform var(--t-fast) var(--ease); }
.lg-pos button:hover i { background: var(--ink-3); }
.lg-pos button.on { background: var(--raised); border-color: var(--line-2); }
.lg-pos button.on i { background: var(--gold); transform: scale(1.4); }
.lg-sliders { display: grid; gap: 10px; }
.lg-sl { margin: 0; }
.lg-sl .label { display: flex; justify-content: space-between; }
.lg-sl .label b { color: var(--ink); }
.lg-sl input { width: 100%; accent-color: var(--gold); }
@media (max-width: 900px) {
  .lg-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'up' 'prev' 'how'; }
}
@media (max-width: 520px) { .lg-ctrl-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- hand-made listing ---------- */
.mf { display: grid; gap: 14px; min-width: 0; }
.mf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.mf-main { display: grid; gap: 14px; min-width: 0; }
.mf-sec { padding: 20px 22px 22px; display: grid; gap: 0; }
.mf-sec > h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 4px; }
.mf-sec > h2 small { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mf-sec > h2 small .icon { width: 14px; height: 14px; }
.mf-n { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); color: var(--gold-text); font-size: 12.5px; font-weight: 800; flex: none; }
.mf-sec .field { margin-top: 14px; }
.mf-chips button { height: 38px; padding: 0 14px; font-size: 14px; }
.mf-combo { position: relative; }
.mf-sugg { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 2px); max-height: 300px; overflow-y: auto; list-style: none; margin: 0; padding: 4px; border-radius: var(--r); background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); }
.mf-sugg li { display: grid; gap: 1px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.mf-sugg li b { font-size: 14px; font-weight: 650; }
.mf-sugg li small { font-size: 12px; color: var(--ink-3); }
.mf-sugg li.hi, .mf-sugg li:hover { background: var(--panel-2); }
.mf-street-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; }
.mf-map { height: 300px; margin-top: 16px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); z-index: 0; }
.mf-map .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--ink-3); }
.mf-map .leaflet-control-attribution a { color: var(--ink-2); }
.mf-map-hint { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; }
.mf-map-hint .icon { width: 14px; height: 14px; }
.mf-cad { max-width: 320px; }
.mf-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; }
.mf-sels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; }
.mf-price { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.mf-amount { width: 220px; }
.mf-amount input { font-size: 18px; font-weight: 750; }
.mf-conv { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.mf-conv:empty { display: none; }
.mf-feat { margin-top: 14px; gap: 6px; }
.mf-write { margin-left: auto; }
.mf-sec textarea { min-height: 80px; }
.mf-drop { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; margin-top: 14px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); background: var(--panel-2); text-align: center; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.mf-drop:hover, .mf-drop.over, .mf-drop:focus-visible { border-color: var(--gold); outline: none; }
.mf-drop.busy { opacity: .7; pointer-events: none; }
.mf-drop > .icon { width: 26px; height: 26px; color: var(--gold-text); }
.mf-drop small { font-size: 12.5px; color: var(--ink-3); }
.mf-photos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mf-photos:empty { display: none; }
.mf-photos li { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--panel-2); cursor: grab; border: 1px solid var(--line); }
.mf-photos li.dragging { opacity: .4; }
.mf-photos img { width: 100%; height: 100%; object-fit: cover; }
.mf-photos .icon-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; background: rgba(0,0,0,.6); color: #fff; border-radius: 7px; }
.mf-photos .icon-btn .icon { width: 14px; height: 14px; }
.mf-cover { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 5px; background: var(--gold); color: #140f04; font-size: 11px; font-weight: 800; }
.mf-lock { color: var(--ink-3); }
.mf-side { position: sticky; top: 12px; }
.mf-sum { padding: 18px; display: grid; gap: 14px; }
.mf-sum h3 { font-size: 14px; }
.mf-sum dl { margin: 0; display: grid; gap: 10px; }
.mf-sum dl div { display: grid; gap: 2px; }
.mf-sum dt { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.mf-sum dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.mf-save { width: 100%; height: 48px; }
@media (max-width: 1100px) {
  .mf-grid { grid-template-columns: minmax(0, 1fr); }
  .mf-side { position: sticky; bottom: 0; top: auto; z-index: 5; }
  .mf-sum { padding: 12px 14px; box-shadow: 0 -10px 24px -12px rgba(0,0,0,.5); }
  .mf-sum h3, .mf-sum dl { display: none; }
}
@media (max-width: 640px) {
  .mf-sec { padding: 16px; }
  .mf-street-row { grid-template-columns: minmax(0, 1fr) 84px; }
  .mf-amount { width: 100%; }
  .mf-map { height: 240px; }
  .mf-side { bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* light theme: the checkerboard and sheets keep working; nothing else needs its own colours */
:root[data-theme='light'] dialog.sheet { box-shadow: -24px 0 48px -20px rgba(20,24,32,.25); }

/* every page here is a one-column grid that never grows wider than the screen */
.cl, .tk, .sh, .cp, .lb, .mf { grid-template-columns: minmax(0, 1fr); }

/* OpenStreetMap tiles, dimmed to sit in the dark theme */
.mf-map.is-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.5); }
.mf-map.is-dark { background: #1a1a1c; }

/* text areas across the new pages */
.cl textarea, .tk textarea, .sh textarea, .cp textarea, .mf textarea, .sr-ed textarea, dialog.sheet textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--field); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cl textarea:focus, .tk textarea:focus, .sh textarea:focus, .cp textarea:focus, .mf textarea:focus, .sr-ed textarea:focus, dialog.sheet textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.cl textarea::placeholder, .tk textarea::placeholder, .sh textarea::placeholder, .cp textarea::placeholder, .mf textarea::placeholder, .sr-ed textarea::placeholder, dialog.sheet textarea::placeholder { color: var(--ink-3); }
textarea:disabled, dialog.sheet input:disabled, dialog.sheet select:disabled { opacity: .6; cursor: not-allowed; }

/* icon rail: counts become a small dot on the icon (the base badge rule comes later in style.css, so restate it here) */
@media (max-width: 1180px) and (min-width: 641px) {
  .nav a .nav-badge { position: absolute; top: 8px; right: 12px; min-width: 9px; width: 9px; height: 9px; padding: 0; margin: 0; border-radius: 50%; font-size: 0; box-shadow: 0 0 0 2px var(--rail); }
}
@media (max-width: 640px) {
  .nav a .nav-badge { position: absolute; top: 7px; right: calc(50% - 15px); min-width: 9px; width: 9px; height: 9px; padding: 0; margin: 0; border-radius: 50%; font-size: 0; box-shadow: 0 0 0 2px var(--rail); }
}

/* toolbars on the new pages: one height for every control */
.cl-bar, .cp-bar { gap: 8px; }
.cl-bar > .search, .cl-bar > select, .cl-bar > .btn, .cp-bar > .btn { height: 42px; }
.cl-bar > .search { flex: 1 1 180px; min-width: 160px; }
.cl-bar > select { min-width: 0; width: auto; flex: none; padding-right: 32px; }
.cl-bar .chips button, .cp-bar .chips button { height: 42px; padding: 0 14px; border-radius: 10px; }
.cl-bar > .seg { flex: none; }
.cl-bar > .btn-primary { margin-left: auto; flex: none; }
.cl-stats { display: grid; grid-template-columns: repeat(3, minmax(110px, 150px)) minmax(0, 1fr); gap: 10px; }
.cl-stat { min-width: 0; }
.cl-today { flex: none; }
@media (max-width: 760px) {
  .cl-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cl-today { grid-column: 1 / -1; }
}

/* the board fits the screen: six across on wide screens, three across (two rows) on laptops, a swipe on phones */
.cl-board { grid-template-columns: repeat(6, minmax(0, 1fr)); overflow-x: visible; }
.cl-col { min-height: 220px; }
@media (max-width: 1280px) and (min-width: 761px) { .cl-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cl-board { grid-template-columns: repeat(6, 78vw); overflow-x: auto; } }
@media (max-width: 1279px) and (min-width: 641px) {
  .cl-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .cl-bar > .search { grid-row: 1; grid-column: 1; }
  .cl-bar > [data-view] { grid-row: 1; grid-column: 2; }
  .cl-bar > [data-new] { grid-row: 1; grid-column: 3; margin: 0; }
  .cl-bar > [data-pri] { grid-row: 2; grid-column: 1 / 3; }
  .cl-bar > [data-deal] { grid-row: 2; grid-column: 3; }
}
@media (max-width: 640px) {
  .cl-bar > .search { flex: 1 1 100%; order: -1; }
  .cl-bar > [data-new] { flex: 1 1 100%; justify-content: center; margin: 0; }
  .cl-bar .chips button { height: 38px; padding: 0 11px; }
}
/* leaderboard table on laptops: icon-only column heads so every column fits */
@media (max-width: 1280px) {
  .lb-th span { display: none; }
  .lb-th .icon { width: 17px; height: 17px; }
  .lb-table th, .lb-table td { padding-left: 10px; padding-right: 10px; }
}
/* goal cards */
.gl-list { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.gl-card { grid-template-columns: 58px minmax(0, 1fr) auto; padding: 14px 16px; align-items: center; }
.gl-txt { gap: 3px; }
.gl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gl-when { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.gl-team { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.gl-team .icon { width: 12px; height: 12px; }
.gl-what { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.gl-left { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-left.ok { color: var(--teal-text); font-weight: 650; }
.gl-act { align-self: start; }

/* listings: six status tabs fit on a laptop screen */
@media (max-width: 1280px) {
  .status-tabs button { padding: 0 10px; gap: 7px; font-size: 14px; }
  .status-tabs .n { min-width: 22px; padding: 0 5px; }
}
@media (max-width: 1100px) and (min-width: 641px) {
  .status-tabs .dot { display: none; }
  .status-tabs button { padding: 0 9px; gap: 6px; font-size: 13.5px; }
}

/* listing page: with several action buttons the title gets its own full row below 1280px */
@media (max-width: 1280px) {
  .detail-head { grid-template-columns: minmax(0, 1fr); }
  .detail-actions { justify-content: flex-start; }
}
.shared-from { grid-column: 1 / -1; }
/* the lari sign is missing from Manrope; draw it from the system font at the same size */
.cur-sw button[data-cur=GEL], [data-cur-switch] button[data-cur=GEL], .mf-price [data-cur] button[data-v=GEL], .cl-range [data-cur] button[data-v=GEL] { font-family: -apple-system, 'Segoe UI', 'Noto Sans Georgian', sans-serif; font-size: 13px; }

/* radar on laptops: the scope card uses the full width so its legend is not squeezed */
@media (max-width: 1280px) and (min-width: 761px) {
  .rd-scope { max-width: none; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); }
  .rd-legend { gap: 10px 20px; }
}
@media (max-width: 1280px) and (min-width: 761px) {
  .rd-scope { grid-template-rows: 1fr auto auto auto 1fr; row-gap: 14px; }
  .rd-scope .scope-wrap { grid-row: 1 / 6; grid-column: 1; }
  .rd-scope > .rd-legend { grid-row: 2; grid-column: 2; }
  .rd-scope > .hint { grid-row: 3; grid-column: 2; margin: 0; }
  .rd-scope > .rd-stats { grid-row: 4; grid-column: 2; }
}

/* hand-made listing on laptops and phones: the summary and Save sit at the end of the form, never over it */
@media (max-width: 1100px) {
  .mf-side { position: static; }
  .mf-sum { box-shadow: var(--shadow); padding: 18px; }
  .mf-sum h3, .mf-sum dl { display: grid; }
  .mf-sum dl { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
/* map zoom buttons in the app's colours */
.mf-map .leaflet-bar { border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; box-shadow: var(--shadow-pop); }
.mf-map .leaflet-bar a { background: var(--raised); color: var(--ink); border-bottom-color: var(--line-2); width: 32px; height: 32px; line-height: 30px; }
.mf-map .leaflet-bar a:hover { background: var(--panel-2); color: var(--gold-text); }
/* fields in a grid row keep their natural height (the row stretching them made labels and boxes uneven) */
.mf .field, .gl .field, .fx-form .field, dialog.sheet .field, .tk .field, .sh .field { align-content: start; }
/* client sheet */
.cl-steps button { text-align: center; }
.cl-sh-top { margin-bottom: 14px; }
.sheet-body { overflow-x: hidden; }
.cl-form-foot { background: linear-gradient(transparent, var(--panel) 35%); padding-top: 22px; }
.cl-form fieldset { min-width: 0; }
.cl-range .control input { width: 100%; }

/* admin: two columns only when there is room for the tables in them */
@media (max-width: 1280px) { .ad-grid { grid-template-columns: minmax(0, 1fr); } .ad-grid > .ad-span2 { grid-column: auto; } .ad-grid > .ad-pw { grid-row: auto; } }

/* side-by-side fields line up: no extra top margin on the second one, no stretched labels */
.field { align-content: start; }
.field-pair { align-items: start; }
@media (min-width: 641px) { .field-pair > .field + .field { margin-top: 0; } }
/* leaderboard on phones: rank, person and points; the details are in the podium and on bigger screens */
@media (max-width: 640px) {
  .lb-table th:nth-child(n+3):nth-child(-n+8), .lb-table td:nth-child(n+3):nth-child(-n+8) { display: none; }
  .lb-who small { display: none; }
}
.src-homes { background: var(--gold); }

/* ---------- Blackkey Homes inside Agent and Admin ---------- */
.up-homes { border-color: color-mix(in srgb, var(--gold) 45%, var(--line-2)); color: var(--gold-text); }
.up-homes:hover:not(:disabled) { background: color-mix(in srgb, var(--gold) 10%, transparent); color: var(--gold-hi); }
.hx-state { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); }
.hx-state.live { border-color: color-mix(in srgb, var(--gold) 45%, var(--line-2)); }
.hx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.hx-state.live .hx-dot { background: var(--gold); }
.hx-state b { display: block; font-size: 13.5px; }
.hx-state small { font-size: 12px; color: var(--ink-3); }
.hx-state-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hx-form { display: grid; gap: 12px; padding: 14px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line-2)); background: var(--panel-2); animation: rise var(--t) var(--ease) both; }
.hx-form > b { font-size: 14.5px; }
.hx-form > p { font-size: 12.5px; color: var(--ink-3); margin-top: -6px; }
.hx-form .field-pair { margin: 0; }
.hx-form .field { margin: 0; }
.hx-form-foot { display: flex; justify-content: flex-end; gap: 8px; }
.hx { display: grid; gap: 18px; }
.hx-band { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 14%, var(--panel)), var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); }
.hx-band b { display: block; font-size: 17px; }
.hx-band small { color: var(--ink-3); font-size: 13px; }
.hx-band .btn { margin-left: auto; }
.hx-band-mark { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--gold); color: #140f04; }
.hx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hx-stats > div { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.hx-stats small { color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.hx-stats b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.hx-stats span { color: var(--ink-3); font-size: 12.5px; }
.hx-reports { list-style: none; margin: 0; padding: 0; }
.hx-reports li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13.5px; }
.hx-reports small { color: var(--ink-3); font-size: 12px; }
.hx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hx-tools .search { flex: 1 1 260px; }
.hx-tools > .btn { margin-left: auto; }
.hx-l { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 220px; }
.hx-l img, .hx-l > span:first-child:empty { width: 56px; height: 42px; border-radius: 6px; object-fit: cover; background: var(--panel-2); flex: none; }
.hx-l > span:last-child { display: grid; min-width: 0; }
.hx-l small { color: var(--ink-3); font-size: 12px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-l:hover .code { color: var(--gold-text); }
.hx-table select { width: auto; height: 34px; font-size: 13px; }
.hx-acts { white-space: nowrap; text-align: right; }
.hx-acts .btn + .btn { margin-left: 4px; }
.hx-muted { color: var(--ink-3); }
.hx-rules { display: grid; gap: 14px; }
.hx-plans .control input { height: 38px; }
.hx-plans td { vertical-align: middle; }
.vip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.vip-silver { background: #c9ccd3; color: #15171b; }
.vip-gold { background: var(--gold); color: #140f04; }
.vip-black { background: #070707; color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold); }
@media (max-width: 900px) { .hx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hx-reports li { grid-template-columns: auto minmax(0, 1fr); } }

/* ---------------- Radar: feed / map / price compare ---------------- */
.rd-view button { display: inline-flex; align-items: center; gap: 6px; }
.rd-view .icon { width: 15px; height: 15px; }
.rd-alt { margin-top: 4px; min-width: 0; }

/* the map: the country on the left, the picked listing on the right */
.rmap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; height: calc(100vh - 230px); min-height: 520px; }
.rmap-stage { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel-2); min-width: 0; }
.rmap-map { position: absolute; inset: 0; }
.rmap-map .leaflet-container, .rmap-map.leaflet-container { background: var(--panel-2); font: inherit; }
[data-theme="dark"] .rmap-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
.rmap-over { position: absolute; top: 12px; left: 56px; right: 12px; z-index: 500; display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.rmap-over > * { pointer-events: auto; }
.rmap-count { background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 650; color: var(--ink); box-shadow: var(--shadow); }
.rmap-over .btn { background: var(--panel); }
.rmap-legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 9px 13px; list-style: none; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 12px; color: var(--ink-2); max-width: calc(100% - 24px); }
.rmap-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rmap-legend .pin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--panel); background: var(--ink-3); }
.rmap-legend .pin.ss { background: var(--site-ss); } .rmap-legend .pin.mh { background: var(--site-mh); }
.rmap-legend .pin.new { background: transparent; border: 2.5px solid var(--gold); }
.rmap-legend .pin.exact { background: var(--ink-2); }
.rmap-legend .pin.approx { background: color-mix(in srgb, var(--ink-2) 45%, transparent); border: 1.5px dashed var(--ink-2); }
.rmap-side { position: relative; overflow: auto; padding: 0; min-width: 0; scrollbar-width: thin; }
.rmap-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 30px; text-align: center; color: var(--ink-3); }
.rmap-empty .icon { width: 28px; height: 28px; color: var(--gold); }
.rmap-empty p { margin: 0; max-width: 24ch; }
.rmap-x { position: absolute; top: 10px; right: 10px; z-index: 3; background: var(--panel); }
.rmap-body .slider { border-radius: 0; aspect-ratio: 4 / 3; }
.rmap-info { display: grid; gap: 10px; padding: 16px 18px 20px; }
.rm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-title { margin: 0; font-size: 17px; line-height: 1.35; }
.rm-geo { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--ink-3); }
.rm-geo .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.rm-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 22px; }
.rm-price small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.rm-when { color: var(--ink-3); }
.rmap-info .rd-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rmap-info .rd-btns .btn { justify-content: center; }
.rm-group { border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); background: color-mix(in srgb, var(--gold) 7%, transparent); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 8px; }
.rm-group > b { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--gold-text); }
.rm-group > b .icon { width: 15px; height: 15px; }
.rm-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rm-group li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; font-size: 13px; min-height: 30px; }
.rm-group li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.rm-group li.self span:nth-child(2) { color: var(--ink); font-weight: 650; }
.rm-gp { font-weight: 700; white-space: nowrap; }
.rm-gp em, .rc-price em { font-style: normal; font-size: 11px; font-weight: 750; color: var(--teal-text); background: color-mix(in srgb, var(--teal) 14%, transparent); border-radius: 999px; padding: 2px 7px; margin-left: 4px; }
@media (max-width: 1100px) {
  .rmap { grid-template-columns: minmax(0, 1fr); height: auto; }
  .rmap-stage { height: 62vh; min-height: 420px; }
  .rmap-side { max-height: none; }
  .rmap-side:not(.open) { display: none; }
}
@media (max-width: 640px) {
  .rd-view span { display: none; }
  .rmap-over { left: 12px; top: auto; bottom: 60px; }
  .rmap-legend { gap: 4px 10px; font-size: 11px; }
  .rmap-info .rd-btns { grid-template-columns: minmax(0, 1fr); }
}

/* one flat, several prices */
.rc { display: grid; gap: 14px; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.rc-head h2 { margin: 0 0 4px; font-size: 20px; }
.rc-head p { margin: 0; color: var(--ink-2); max-width: 70ch; font-size: 14px; }
.rc-sort { display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); }
.rc-sort select { min-width: 220px; }
.rc-found { margin: 0; color: var(--ink-3); font-size: 13px; }
.rc-list { display: grid; gap: 12px; }
.rc-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; animation: rise var(--t) var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.rc-top { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.rc-img { width: 76px; height: 58px; border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); }
.rc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-what { display: grid; gap: 3px; min-width: 0; }
.rc-what b { font-size: 15px; }
.rc-what span { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-what span .icon { width: 13px; height: 13px; flex: none; }
.rc-what small { color: var(--ink-3); font-size: 12px; }
.rc-gap b { display: inline-block; font-size: 13px; color: var(--teal-text); background: color-mix(in srgb, var(--teal) 12%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.rc-rows { list-style: none; margin: 0; padding: 6px 8px; display: grid; }
.rc-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 8px; border-radius: var(--r-sm); }
.rc-rows li + li { border-top: 1px solid var(--line); }
.rc-rows li.cheapest { background: color-mix(in srgb, var(--teal) 7%, transparent); }
.rc-who { display: grid; min-width: 0; }
.rc-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-who small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-price { display: grid; justify-items: end; font-weight: 750; font-size: 15px; white-space: nowrap; }
.rc-price small { color: var(--terra-text); font-size: 12px; font-weight: 650; }
.rc-price em { margin: 2px 0 0; }
.rc-none { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.rc-none .icon { width: 28px; height: 28px; color: var(--gold); }
.rc-none p { margin: 0; max-width: 52ch; }
@media (max-width: 720px) {
  .rc-top { grid-template-columns: 60px minmax(0, 1fr); }
  .rc-img { width: 60px; height: 48px; }
  .rc-gap { grid-column: 1 / -1; }
  .rc-rows li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rc-rows li .btn { grid-column: 2 / -1; justify-self: start; }
}

/* ---------------- Showroom (agent side) ---------------- */
.sr-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sr-lede { margin: 0; color: var(--ink-2); max-width: 60ch; }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sr-card { padding: 0; overflow: visible; display: grid; grid-template-rows: auto 1fr; }
.sr-covers { position: relative; display: grid; gap: 2px; aspect-ratio: 16 / 9; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: var(--panel-2); }
.sr-covers img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.sr-covers.n2 { grid-template-columns: 1fr 1fr; }
.sr-covers.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.sr-covers.n3 img:first-child { grid-row: span 2; }
.sr-covers.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.sr-covers > span { display: grid; place-items: center; color: var(--ink-3); }
.sr-state { position: absolute; left: 10px; top: 10px; font-size: 11.5px; font-weight: 750; padding: 4px 9px; border-radius: 999px; background: rgba(7, 7, 7, .72); color: #ece8df; }
.sr-state.live { background: var(--teal); color: #04241e; }
.sr-state.expired { background: var(--terra); color: #2a0b04; }
.sr-cbody { padding: 14px 16px 16px; display: grid; gap: 10px; align-content: start; }
.sr-cbody h3 { margin: 0; font-size: 16px; }
.sr-cbody h3 a { color: inherit; text-decoration: none; }
.sr-cbody h3 a:hover { color: var(--accent-text); }
.sr-meta { margin: 0; color: var(--ink-3); font-size: 13px; }
.sr-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-3); }
.sr-stats span { display: inline-flex; align-items: center; gap: 5px; }
.sr-stats .icon { width: 14px; height: 14px; }
.sr-stats span.on { color: var(--ink-2); }
.sr-stats .like { color: var(--terra-text); } .sr-stats .nope { color: var(--ink-3); }
.sr-acts { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; margin-top: 4px; }
.sr-acts > .btn:first-child { justify-content: center; }
.sr-acts .icon-btn, .sr-acts .sr-ib { width: 36px; height: 36px; padding: 0; justify-content: center; }
.sr-more { position: relative; }
.sr-more summary { list-style: none; cursor: pointer; }
.sr-more summary::-webkit-details-marker { display: none; }
.sr-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 210px; padding: 6px; display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.sr-menu a, .sr-menu button { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px; border-radius: 7px; border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; text-align: left; }
.sr-menu a:hover, .sr-menu button:hover { background: var(--raised); color: var(--ink); }
.sr-menu .icon { width: 15px; height: 15px; }
.sr-menu .danger { color: var(--terra-text); }
.sr-empty { display: grid; justify-items: center; gap: 12px; padding: 56px 24px; text-align: center; }
.sr-empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.sr-empty-ic .icon { width: 26px; height: 26px; }
.sr-empty h2 { margin: 0; font-size: 20px; }
.sr-empty p { margin: 0; color: var(--ink-2); max-width: 56ch; }

/* the share sheet */
.sr-sheet { width: min(520px, calc(100vw - 32px)); }
.sr-sheet-in { position: relative; display: grid; gap: 14px; padding: 28px 24px 24px; text-align: center; justify-items: center; }
.sr-x { position: absolute; top: 12px; right: 12px; }
.sr-sheet-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal-text); }
.sr-sheet-ic .icon { width: 24px; height: 24px; }
.sr-sheet h2 { margin: 0; font-size: 20px; }
.sr-sheet p { margin: 0; color: var(--ink-2); max-width: 42ch; }
.sr-local { display: flex; gap: 8px; text-align: left; padding: 10px 12px; border-radius: var(--r); background: color-mix(in srgb, var(--gold) 9%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); font-size: 13px; color: var(--ink-2) !important; }
.sr-local .icon { width: 16px; height: 16px; flex: none; color: var(--gold); margin-top: 2px; }
.sr-linkbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }
.sr-linkbox input { height: 46px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--field); color: var(--ink); font: inherit; font-size: 13.5px; min-width: 0; }
.sr-share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.sr-share-row .btn { justify-content: center; padding: 0 8px; }
.sr-qr { margin: 4px 0 0; display: grid; justify-items: center; gap: 6px; }
.sr-qr [data-qr] { width: 150px; height: 150px; padding: 8px; border-radius: 12px; background: #fff; }
.sr-qr svg { width: 100%; height: 100%; display: block; }
.sr-qr figcaption { font-size: 12px; color: var(--ink-3); }
@media (max-width: 520px) { .sr-share-row { grid-template-columns: 1fr 1fr; } }

/* the editor */
.sr-form { display: grid; gap: 18px; }
.sr-fields { display: grid; gap: 4px; padding: 20px; }
.sr-tpls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.sr-tpls > span { font-size: 12px; color: var(--ink-3); margin-right: 4px; }
.sr-tpls .chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sr-tpls .chip:hover { color: var(--ink); border-color: var(--ink-3); }
.sr-set { border: 0; padding: 0; margin: 6px 0 0; min-width: 0; }
.sr-set legend { font-weight: 700; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.sr-switch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 10px; cursor: pointer; }
.sr-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sr-switch .sw { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background var(--t-fast); margin-top: 1px; }
.sr-switch .sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform var(--t-fast) var(--ease); }
.sr-switch input:checked + .sw { background: var(--teal); }
.sr-switch input:checked + .sw::after { transform: translateX(18px); }
.sr-switch input:focus-visible + .sw { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-switch b { display: block; font-size: 14px; }
.sr-switch small { color: var(--ink-3); font-size: 12.5px; }
.sr-pick { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sr-pool, .sr-chosen { padding: 0; overflow: hidden; }
.sr-pool header, .sr-chosen header { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.sr-chosen header { display: flex; align-items: center; justify-content: space-between; }
.sr-pool h2, .sr-chosen h2 { margin: 0; font-size: 15px; }
.sr-pool header p { margin: 0; color: var(--ink-3); font-size: 12.5px; }
.sr-pool-tools { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.sr-pool-tools .search { flex: 1; min-width: 180px; }
.sr-pool-list { max-height: 560px; overflow: auto; padding: 8px; display: grid; gap: 4px; scrollbar-width: thin; }
.sr-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.sr-item:hover { background: var(--panel-2); }
.sr-item.on { background: color-mix(in srgb, var(--gold) 9%, transparent); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.sr-th { position: relative; width: 64px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; flex: none; }
.sr-th img { width: 100%; height: 100%; object-fit: cover; }
.sr-noimg .icon { width: 18px; height: 18px; color: var(--ink-3); }
.sr-tick { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7, 7, 7, .55); color: var(--gold); opacity: 0; transition: opacity var(--t-fast); }
.sr-tick .icon { width: 22px; height: 22px; }
.sr-item.on .sr-tick { opacity: 1; }
.sr-tx { display: grid; min-width: 0; gap: 1px; }
.sr-tx b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-tx b .code { color: var(--ink-3); font-weight: 700; margin-right: 4px; }
.sr-tx small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-pr { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.sr-chosen-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 4px; min-height: 120px; }
.sr-chosen-list li { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: var(--r); background: var(--panel); cursor: grab; }
.sr-chosen-list li.dragging { opacity: .5; }
.sr-chosen-list li + li { border-top: 1px solid var(--line); }
.sr-chosen-none { display: block !important; padding: 28px 12px !important; text-align: center; color: var(--ink-3); font-size: 13.5px; cursor: default !important; }
.sr-num { font-weight: 800; color: var(--gold-text); text-align: center; font-size: 13px; }
.sr-ord { display: flex; gap: 2px; }
.sr-ord .icon-btn { width: 30px; height: 30px; }
.sr-ord [data-up] .icon { transform: rotate(180deg); }
.sr-r { display: inline-flex !important; align-items: center; gap: 4px; }
.sr-r .icon { width: 12px; height: 12px; }
.sr-r.like { color: var(--terra-text) !important; }
.sr-foot { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0; background: linear-gradient(to top, var(--ground) 70%, transparent); }
@media (max-width: 980px) { .sr-pick { grid-template-columns: minmax(0, 1fr); } .sr-pool-list { max-height: 420px; } }
@media (max-width: 560px) { .sr-chosen-list li { grid-template-columns: 18px 52px minmax(0, 1fr); } .sr-chosen-list li .sr-ord { grid-column: 3; justify-self: start; } .sr-th { width: 52px; height: 42px; } .sr-item { grid-template-columns: 52px minmax(0, 1fr); } .sr-pr { grid-column: 2; } }

/* ---------- the Blackkey Homes account an agent posts from ---------- */
.hx-acc .modal-card { width: 470px; gap: 14px; }
.hx-acc .field { margin: 0; }
.hx-acc-lede { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin-top: -4px; }
.hx-acc-mode { justify-self: start; }
.hx-acc-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.hx-acc-note .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--gold-text); }
.hx-as { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: inherit; text-decoration: none; transition: border-color var(--t-fast); }
.hx-as:hover { border-color: var(--gold); }
.hx-as-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #140f04; font-weight: 800; }
.hx-as small { display: block; font-size: 12px; color: var(--ink-3); }
.hx-as b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-as b i { font-style: normal; font-weight: 600; color: var(--ink-3); }
.hx-as > .icon { width: 16px; height: 16px; color: var(--ink-3); }

/* ---------- Radar: toolbar and feed pages ---------- */
.rd-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.rd-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rd-actions-r { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.rd-narrow { align-items: center; }
.rd-narrow .icon { color: var(--gold-text); }
.rd-narrow > div { flex: 1; }
.rd-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 18px 0 6px; }
.rd-pages:empty { display: none; }
.rd-pages button { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; display: inline-grid; place-items: center; }
.rd-pages button:hover:not(:disabled) { background: var(--panel-2); }
.rd-pages button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.rd-pages button:disabled { opacity: .4; cursor: default; }
.rd-pages .icon { width: 17px; height: 17px; }
.rd-pages .pg-gap { color: var(--ink-3); padding: 0 2px; }
.rd-pages small { flex-basis: 100%; text-align: center; color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 760px) {
  .rd-actions-r { margin-left: 0; width: 100%; }
}

/* ---------- Deals: the pipeline ---------- */
.dl { display: grid; gap: 18px; align-content: start; }
.dl > * { min-width: 0; }
.dl-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.dl-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-stats > div { display: grid; gap: 2px; min-width: 150px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.dl-stats small { color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.dl-stats b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.dl-stats .gold b { color: var(--gold-text); }
.dl-acts { display: flex; align-items: center; gap: 10px; }
.dl-acts .seg button { display: inline-flex; align-items: center; gap: 6px; }
.dl-acts .seg .icon { width: 15px; height: 15px; }
.dl-intro { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px dashed var(--line-2); }
.dl-intro > .icon { width: 28px; height: 28px; color: var(--gold-text); flex: none; }
.dl-intro div { flex: 1; }
.dl-intro p { color: var(--ink-2); font-size: 14px; margin-top: 2px; max-width: 70ch; }
.dl-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.dl-col { display: flex; flex-direction: column; min-height: 320px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); scroll-snap-align: start; transition: border-color var(--t-fast), background var(--t-fast); }
.dl-col header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.dl-col header > b { grid-column: 2; font-size: 12.5px; color: var(--gold-text); font-weight: 750; }
.dl-step { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) calc(8% + var(--k) * 5%), var(--panel-2)); color: var(--gold-text); }
.dl-step .icon { width: 16px; height: 16px; }
.dl-col h3 { font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.dl-col h3 i { font-style: normal; font-weight: 700; font-size: 12px; color: var(--ink-3); background: var(--panel-2); border-radius: 999px; padding: 1px 7px; }
.dl-col header small { grid-column: 2; color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.dl-drop { flex: 1; display: grid; align-content: start; gap: 8px; padding: 10px; }
.dl-hole { display: grid; place-items: center; min-height: 80px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 10px; }
.dl-col.over, .dl-end.over { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 6%, var(--panel)); }
.dl-card { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); cursor: grab; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.dl-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: 0 10px 20px -16px rgba(0, 0, 0, .6); }
.dl-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dl-card.dragging { opacity: .45; }
.dl-card-top { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; }
.dl-card-top img, .dl-card-ic { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--raised); display: grid; place-items: center; color: var(--ink-3); }
.dl-card-ic .icon { width: 18px; height: 18px; }
.dl-card-top b { display: block; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-card-top small { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-card-money { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 14.5px; }
.dl-card-money em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 12px; font-weight: 750; color: var(--gold-text); }
.dl-card-money em .icon { width: 13px; height: 13px; }
.dl-card-next { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.dl-card-next .icon { width: 13px; height: 13px; flex: none; color: var(--ink-3); }
.dl-card-next span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-card-next i { font-style: normal; font-weight: 700; color: var(--ink-3); flex: none; }
.dl-card-next.late i { color: var(--terra-text); }
.dl-card-age { color: var(--ink-3); font-size: 11.5px; }
.dl-ends { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dl-end { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); color: var(--ink-3); font-weight: 650; font-size: 13.5px; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.dl-end .icon { width: 18px; height: 18px; }
.dl.is-dragging .dl-end.won { color: var(--teal-text); border-color: color-mix(in srgb, var(--teal) 60%, var(--line-2)); }
.dl.is-dragging .dl-end.lost { color: var(--terra-text); border-color: color-mix(in srgb, var(--terra) 50%, var(--line-2)); }
.dl-none { padding: 22px; color: var(--ink-3); }
.dl-hist td small { display: block; color: var(--ink-3); font-size: 12px; }
.dl-hist tr[data-open] { cursor: pointer; }
.dl-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.dl-steps button { width: 100%; display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-3); font-weight: 700; font-size: 12px; cursor: pointer; }
.dl-steps .icon { width: 16px; height: 16px; }
.dl-steps button.past { color: var(--ink-2); border-color: color-mix(in srgb, var(--gold) 30%, var(--line-2)); }
.dl-steps button.on { background: var(--gold); border-color: var(--gold); color: #140f04; }
.dl-outcome { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.dl-confirm { display: grid; gap: 10px; padding: 14px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); justify-items: start; animation: rise var(--t) var(--ease) both; }
.dl-confirm.won { border-color: color-mix(in srgb, var(--gold) 50%, var(--line-2)); }
.dl-confirm .control { width: 100%; }
.dl-form { display: grid; gap: 14px; }
.dl-form .field { margin: 0; }
.dl-money { display: flex; gap: 8px; align-items: center; }
.dl-money .control { flex: 1; }
.dl-form-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; }
.dl-log { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.dl-log h3 { font-size: 15px; margin-bottom: 10px; }
.dl-note { display: flex; gap: 8px; margin-bottom: 12px; }
.dl-note .control { flex: 1; }
.dl-log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dl-log li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dl-log li small { color: var(--ink-3); white-space: nowrap; }
@media (max-width: 760px) {
  .dl-board { grid-template-columns: repeat(5, 82%); }
  .dl-stats > div { min-width: calc(50% - 5px); flex: 1; }
  .dl-steps span { display: none; }
  .dl-ends { grid-template-columns: 1fr; }
}

/* ---------- Team HQ: the manager's room ---------- */
.hq { display: grid; gap: 18px; align-content: start; container-type: inline-size; }
.hq > * { min-width: 0; }
.hq-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hq-team { display: flex; align-items: center; gap: 12px; }
.hq-team > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--panel)); color: var(--gold-text); }
.hq-team b { display: block; font-size: 17px; }
.hq-team small { color: var(--ink-3); font-size: 13px; }
.hq-alone { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: var(--panel); }
.hq-alone > .icon { width: 24px; height: 24px; color: var(--gold-text); flex: none; }
.hq-alone p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.hq-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.hq-kpi { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.hq-kpi-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--ink-2); }
.hq-kpi-ic .icon { width: 17px; height: 17px; }
.hq-kpi small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.hq-kpi b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.hq-kpi span:not(.hq-kpi-ic) { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.hq-kpi.gold b, .hq-kpi.gold .hq-kpi-ic { color: var(--gold-text); }
.hq-kpi.warn b, .hq-kpi.warn .hq-kpi-ic { color: var(--terra-text); }
.hq-kpis.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 12px; }
.hq-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@container (min-width: 1180px) { .hq-cols { grid-template-columns: minmax(0, 1fr) 320px; } }
.hq-side { display: grid; gap: 18px; min-width: 0; }
.hq-table tbody tr { cursor: pointer; }
.hq-table tbody tr:hover { background: var(--panel-2); }
.hq-table td b.tnum { font-size: 15px; }
.hq-table td small { display: block; font-size: 12px; color: var(--ink-3); }
.hq-table td small.bad { color: var(--terra-text); }
.hq-table td small.gold { color: var(--gold-text); }
.hq-who { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.hq-who b i { font-style: normal; font-weight: 650; font-size: 11.5px; color: var(--gold-text); }
.hq-on { color: var(--teal-text); font-weight: 700; }
.hq-stages { list-style: none; margin: 0; padding: 6px 20px 18px; display: grid; gap: 10px; }
.hq-stages li { display: grid; grid-template-columns: 100px minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 13.5px; }
.hq-stages i { height: 10px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.hq-stages i b { display: block; height: 100%; border-radius: 4px; background: var(--gold); transition: width var(--t-slow) var(--ease); }
.hq-stages em { font-style: normal; text-align: right; font-weight: 750; }
.hq-feed { max-height: 520px; overflow: auto; }
.hq-agent-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hq-agent-top b { display: block; font-size: 18px; }
.hq-agent-top small { color: var(--ink-3); }
.hq-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hq-tabs button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font-weight: 650; font-size: 13px; cursor: pointer; }
.hq-tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.hq-meta { color: var(--ink-3); font-size: 13px; }
.hq-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.hq-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hq-rows img, .hq-noimg { width: 48px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--panel-2); }
.hq-rows b { display: block; font-size: 14px; }
.hq-rows small { display: block; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--line-2); }
.hq-dot.ok { background: var(--teal); } .hq-dot.bad { background: var(--terra); } .hq-dot.gold, .hq-dot.p-hot { background: var(--gold); } .hq-dot.p-warm { background: var(--c1); } .hq-dot.p-cold { background: var(--c-muted); }

/* ---------- Showroom: what the client looked at ---------- */
.sr-insight { margin-bottom: 18px; grid-column: 1 / -1; align-self: start; height: auto; }
.sr-insight-kpi { align-content: start; }
.sr-insight .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.sr-insight .panel-head h2 .icon { width: 17px; height: 17px; color: var(--gold-text); }
.sr-insight-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); align-items: start; gap: 8px; padding: 4px 20px 16px; }
.sr-insight-kpi > div { height: auto; min-height: 0; }
.sr-insight-kpi > div { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.sr-insight-kpi small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 650; }
.sr-insight-kpi b { font-size: 18px; font-weight: 800; }
.sr-insight-rows { list-style: none; margin: 0; padding: 0 20px 18px; display: grid; gap: 4px; }
.sr-insight-rows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.sr-insight-rows .sr-th { width: 56px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.sr-insight-rows .sr-th img { width: 100%; height: 100%; object-fit: cover; }
.sr-insight-main { display: grid; gap: 5px; min-width: 0; }
.sr-insight-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-insight-main small { color: var(--ink-3); font-size: 12.5px; }
.sr-insight-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.sr-insight-bar i { display: block; height: 100%; border-radius: 4px; background: var(--gold); }
.sr-insight-rows .sr-r { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.sr-insight-rows .sr-r .icon { width: 14px; height: 14px; }
.sr-insight-rows .sr-r.like { color: var(--teal-text); } .sr-insight-rows .sr-r.no { color: var(--terra-text); }

/* ---------- Tools → MCP ---------- */
.mc { display: grid; gap: 18px; align-content: start; container-type: inline-size; }
.mc > * { min-width: 0; }
/* ---------- AI connection (MCP) ---------- */
.mc { display: grid; gap: 22px; }
.mc h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
:lang(ka) .mc h2 { letter-spacing: 0; }

/* hero: what MCP is, how it flows, what you can ask */
.mc-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); overflow: hidden; isolation: isolate; }
.mc-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(640px 260px at 0 0, rgba(212, 172, 85, .09), transparent 70%); }
@container (min-width: 960px) { .mc-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; } }
.mc-hero-tx { display: grid; gap: 24px; align-content: start; }
.mc-lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); max-width: 56ch; text-wrap: pretty; }
.mc-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; position: relative; }
/* the hairline the three steps sit on */
.mc-flow::before { content: ''; position: absolute; top: 19px; left: 20px; right: calc(33.33% - 20px); height: 1px; background: linear-gradient(90deg, var(--line-2), var(--gold) 92%); }
.mc-flow li { position: relative; display: grid; gap: 4px; padding-right: 12px; }
.mc-flow-ic { width: 38px; height: 38px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 11px; background: var(--raised); box-shadow: 0 0 0 1px var(--line-2) inset, 0 0 0 5px var(--panel); color: var(--ink-2); }
.mc-flow-ic.gold { background: var(--gold); color: #140f04; box-shadow: 0 0 0 5px var(--panel); }
.mc-flow-ic .icon { width: 17px; height: 17px; }
.mc-flow b { font-size: 14px; font-weight: 700; }
.mc-flow small { font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.mc-ex h3 { margin: 0 0 12px; font-size: 13px; font-weight: 650; color: var(--ink-3); }
.mc-ex ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; justify-items: start; }
/* the examples read as things said to an assistant: speech bubbles, tail at the bottom left */
.mc-ex li { position: relative; max-width: 100%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink); animation: rise var(--t) var(--ease) both; animation-delay: var(--d, 0ms); }
.mc-ex li:nth-child(even) { justify-self: end; border-radius: 14px 14px 4px 14px; background: var(--raised); }

.mc-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
@container (min-width: 1100px) { .mc-cols { grid-template-columns: minmax(0, 1fr) 360px; } }
.mc-steps, .mc-side { display: grid; gap: 22px; min-width: 0; }

/* steps */
.mc-step { padding: 24px; display: grid; gap: 22px; }
.mc-step-head { display: flex; gap: 14px; align-items: flex-start; }
.mc-step-head p { margin: 5px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.mc-n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--gold); color: #140f04; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.mc-count { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--ink-3); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: 2px; }

.mc-make { display: grid; gap: 18px; padding-left: 44px; }
.mc-make .field { margin: 0; display: grid; gap: 8px; }
.mc-make .error-text { margin: 0; }
.mc-life { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-life button { height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.mc-life button:hover { color: var(--ink); border-color: var(--ink-3); }
.mc-life button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.mc-life button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mc-make .hint { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.mc-make-btn { justify-self: start; }
.mc-make-btn:disabled { opacity: .4; cursor: not-allowed; }

.mc-fresh { margin-left: 44px; display: grid; gap: 14px; padding: 18px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line-2)); background: color-mix(in srgb, var(--gold) 6%, var(--panel)); animation: rise var(--t) var(--ease) both; }
.mc-fresh-head { display: flex; gap: 12px; align-items: flex-start; }
.mc-fresh-head > .icon { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--gold); color: #140f04; }
.mc-fresh b { display: block; font-size: 14.5px; }
.mc-fresh p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }

/* the code wells: a key, the server address, a snippet */
.mc-secret, .mc-snip { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 6px 6px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); }
.mc-secret code, .mc-snip pre { flex: 1; min-width: 0; margin: 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.mc-secret code { letter-spacing: .02em; }
.mc-secret.open code { color: var(--ink); }
.mc-secret.big { padding: 8px 8px 8px 16px; }
.mc-secret.big code { font-size: 13.5px; color: var(--gold-text); }
.mc-snip { align-items: flex-start; padding: 14px 8px 14px 16px; }
.mc-snip pre { white-space: pre; color: var(--ink); }
.mc-snip pre code { font: inherit; }
.mc-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.mc-copy .icon { width: 14px; height: 14px; }
.mc-copy:hover { color: var(--ink); border-color: var(--ink-3); }
.mc-copy.copied { color: var(--teal-text); border-color: var(--teal); }
.mc-icon-btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.mc-icon-btn:hover { color: var(--ink); background: var(--panel-2); }
.mc-icon-btn[aria-pressed="true"] { color: var(--gold-text); }
.mc-icon-btn .icon { width: 17px; height: 17px; }
.mc-copy:focus-visible, .mc-icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* your keys */
.mc-keys { list-style: none; margin: 0 0 0 44px; padding: 0; display: grid; }
.mc-key { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 18px 0; border-top: 1px solid var(--line); }
.mc-key:first-child { border-top: 0; padding-top: 0; }
.mc-key.is-new .mc-key-ic { background: var(--gold); color: #140f04; }
.mc-key.is-expired .mc-key-main b, .mc-key.is-expired .mc-secret code { color: var(--ink-3); }
.mc-key-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--panel-2); color: var(--gold-text); }
.mc-key-ic .icon { width: 16px; height: 16px; }
.mc-key-main { display: grid; gap: 10px; min-width: 0; }
.mc-key-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mc-key-top b { font-size: 14.5px; }
.mc-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--ink-2); }
.mc-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mc-pill.ok { color: var(--teal-text); }
.mc-pill.warn { color: var(--gold-text); }
.mc-pill.bad { color: var(--terra-text); }
.mc-key-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; color: var(--ink-3); }
.mc-key-meta span + span::before { content: '·'; margin: 0 8px; }
.mc-old { font-style: italic; }
.mc-del { margin-top: 4px; }
.mc-empty { margin-left: 44px; display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 14px; }
.mc-empty p { margin: 0; }
.mc-empty .icon { width: 18px; height: 18px; }

/* connect */
.mc-connect { display: grid; gap: 16px; padding-left: 44px; min-width: 0; }
.mc-connect .field { margin: 0; display: grid; gap: 8px; }
.mc-tabs-wrap { overflow-x: auto; scrollbar-width: none; }
.mc-tabs { width: max-content; }
.mc-how { margin: -4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.mc-hint { margin: -6px 0 0; display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.mc-hint.ok { color: var(--teal-text); }
.mc-hint .icon { width: 14px; height: 14px; }
.mc-note { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 8%, var(--panel-2)); font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.mc-note .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--gold-text); }
.mc-note.quiet { background: var(--panel-2); }
.mc-note.quiet .icon { color: var(--ink-3); }

/* what the assistant can do */
.mc-side .panel { padding: 22px; display: grid; gap: 18px; }
.mc-side-head p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.mc-group h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.mc-group h3 small { margin-left: auto; font-variant-numeric: tabular-nums; }
.mc-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--ink-3); }
.mc-dot.gold { background: var(--gold); }
.mc-tools { list-style: none; margin: 0; padding: 0; display: grid; }
.mc-tools li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.mc-tools b { font-size: 13.5px; font-weight: 650; }
.mc-tools small { font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.mc-bot { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); }
.mc-bot > .icon { width: 20px; height: 20px; color: var(--gold-text); flex: none; margin-top: 1px; }
.mc-bot b { font-size: 14px; }
.mc-bot p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }

@media (max-width: 640px) {
  .mc-hero { padding: 20px; gap: 22px; }
  .mc-lede { font-size: 15.5px; }
  .mc-flow { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .mc-flow::before { top: 20px; bottom: 20px; left: 19px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--line-2), var(--gold)); }
  .mc-flow li { grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; padding: 0; }
  .mc-flow-ic { grid-row: span 2; margin: 0; }
  .mc-step { padding: 18px; gap: 18px; }
  .mc-make, .mc-connect { padding-left: 0; }
  .mc-fresh, .mc-keys, .mc-empty { margin-left: 0; }
  .mc-key { grid-template-columns: minmax(0, 1fr) auto; }
  .mc-key-ic { display: none; }
  .mc-del { margin: 0; width: 34px; padding: 0; justify-content: center; }
  .mc-del span { display: none; }
  .mc-key-meta { flex-direction: column; gap: 2px; }
  .mc-key-meta span + span::before { content: none; }
  .mc-copy span { display: none; }
  .mc-copy { width: 32px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .mc-ex li, .mc-fresh { animation: none; } }

/* the brass button, for the one action that closes something good */
.btn-gold { background: var(--gold); color: #140f04; border-color: var(--gold); font-weight: 750; }
.btn-gold:hover:not(:disabled) { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn-gold .spinner { border-color: rgba(20, 15, 4, .25); border-top-color: #140f04; }

/* ---------- Radar: AI search ---------- */
.ai-box { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 18px; padding: 20px 22px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); isolation: isolate; overflow: hidden; }
/* a faint brass wash in the corner the mark sits in: the one place on Radar that "thinks" */
.ai-box::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px 180px at 0 0, rgba(212, 172, 85, .07), transparent 70%); }
.ai-head { display: flex; align-items: flex-start; gap: 14px; }
.ai-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.ai-head p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); max-width: 68ch; }
:lang(ka) .ai-head h2 { letter-spacing: 0; }

/* the mark: four tesserae */
.ai-mark { flex: none; display: grid; grid-template-columns: repeat(2, 9px); gap: 3px; padding: 7px; border-radius: 10px; background: var(--raised); box-shadow: 0 0 0 1px var(--line-2) inset; margin-top: 1px; }
.ai-mark i { width: 9px; height: 9px; border-radius: 2px; background: var(--gold); }
.ai-mark i:nth-child(2) { opacity: .55; }
.ai-mark i:nth-child(3) { opacity: .35; }
.ai-mark i:nth-child(4) { opacity: .8; }
.ai-box.is-thinking .ai-mark i { animation: ai-tile 1.1s var(--ease) infinite; }
.ai-box.is-thinking .ai-mark i:nth-child(2) { animation-delay: .14s; }
.ai-box.is-thinking .ai-mark i:nth-child(4) { animation-delay: .28s; }
.ai-box.is-thinking .ai-mark i:nth-child(3) { animation-delay: .42s; }
@keyframes ai-tile { 0%, 100% { opacity: .25; transform: scale(.82); } 40% { opacity: 1; transform: scale(1); } }

/* the field */
.ai-form { display: block; }
.ai-field { position: relative; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--field); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.ai-field:hover { border-color: var(--ink-3); }
.ai-field:focus-within { border-color: var(--gold); background: var(--field-focus); box-shadow: 0 0 0 4px var(--accent-ring); }
.ai-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15.5px; outline: none; caret-color: var(--gold); }
.ai-field input::placeholder { color: var(--ink-3); }
.ai-field input::selection { background: rgba(212, 172, 85, .32); }
.ai-kbd { flex: none; display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink-3); font: 600 12px/1 var(--font); }
.ai-field:focus-within .ai-kbd, .ai-box.is-thinking .ai-kbd { display: none; }
.ai-send { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.ai-send .icon { width: 18px; height: 18px; }
.ai-send:hover:not(:disabled) { background: var(--accent-hi); }
.ai-send:active:not(:disabled) { transform: scale(.94); }
.ai-send:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ai-send:disabled { cursor: progress; opacity: .45; }
/* reading: a brass line sweeps along the bottom of the field */
.ai-field::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); background-size: 40% 100%; background-repeat: no-repeat; opacity: 0; }
.ai-box.is-thinking .ai-field::after { opacity: 1; animation: ai-sweep 1.2s var(--ease) infinite; }
@keyframes ai-sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.ai-status { margin: -6px 0 0; font-size: 13px; color: var(--gold-text); }
.ai-status:empty { display: none; }

/* examples and results share one row shape: a label column, then the content */
.ai-row-label { flex: none; min-width: 64px; padding-top: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.ai-try, .ai-res { display: flex; align-items: flex-start; gap: 12px; }
.ai-try-list, .ai-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.ai-try button { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ai-try button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-try button .icon { flex: none; width: 13px; height: 13px; color: var(--gold-text); }
.ai-try button:hover { border-color: var(--line-2); color: var(--ink); }
.ai-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raised); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; animation: ai-in var(--t) var(--ease) both; animation-delay: var(--d, 0ms); transition: border-color var(--t-fast) var(--ease); }
.ai-chip .icon { width: 13px; height: 13px; color: var(--ink-3); transition: color var(--t-fast) var(--ease); }
.ai-chip:hover { border-color: var(--terra); }
.ai-chip:hover .icon { color: var(--terra-text); }
.ai-chip:focus-visible, .ai-try button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@keyframes ai-in { from { opacity: 0; transform: translateY(4px); } }
.ai-none { padding-top: 7px; font-size: 13.5px; color: var(--ink-2); }
.ai-note { display: flex; gap: 8px; margin: -4px 0 0; padding-left: 76px; font-size: 13px; line-height: 1.5; color: var(--gold-text); }
.ai-note .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); min-width: 0; flex: 1; }
.ai-mode { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ai-mode i { width: 7px; height: 7px; border-radius: 2px; background: var(--ink-3); }
.ai-mode.is-ai { color: var(--gold-text); }
.ai-mode.is-ai i { background: var(--gold); }
.ai-why { max-width: 70ch; }
@media (prefers-reduced-motion: reduce) {
  .ai-box.is-thinking .ai-mark i, .ai-box.is-thinking .ai-field::after, .ai-chip { animation: none; }
}
@media (max-width: 640px) {
  .ai-box { padding: 16px; gap: 14px; }
  .ai-head p { display: none; }
  .ai-kbd { display: none; }
  .ai-field { height: 52px; padding-left: 14px; }
  .ai-try, .ai-res { flex-direction: column; gap: 8px; }
  .ai-row-label { padding-top: 0; }
  .ai-try-list { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .ai-try button span { white-space: nowrap; }
  .ai-note { padding-left: 0; }
}

/* ---------- Admin: AI search ---------- */
.ai-panel { margin-top: 18px; }
.ai-adm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.ai-key { display: grid; gap: 8px; align-content: start; }
.ai-key-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-key-row .control { flex: 1; min-width: 200px; }
.ai-key-now { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ai-key-now .icon { width: 16px; height: 16px; color: var(--gold-text); }
.ai-key-now small, .ai-key-none { color: var(--ink-3); font-size: 13px; margin: 0; }
.ai-key a { color: var(--gold-text); }
.ai-facts { display: grid; gap: 12px; align-content: start; }
.ai-facts .fx-facts { margin: 0; }
.ai-facts .fx-facts small { color: var(--ink-3); margin-left: 6px; }
.ai-limits { display: grid; gap: 8px; justify-items: start; }
.ai-limits .ad-num { width: 100%; }
.ai-models ol { margin: 6px 0 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); }
.ai-privacy { margin: 0; display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); }
.ai-privacy .icon { width: 16px; height: 16px; flex: none; color: var(--gold-text); margin-top: 2px; }
@media (max-width: 860px) { .ai-adm { grid-template-columns: minmax(0, 1fr); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Analytics: commission tracker ---------- */
.cm { margin-top: 18px; }
.cm .panel-head { align-items: flex-start; }
.cm-body { display: grid; gap: 22px; padding: 4px 22px 22px; }
.cm-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cm-fig { display: grid; gap: 6px; align-content: start; padding: 16px 18px; min-width: 0; }
.cm-fig + .cm-fig { border-left: 1px solid var(--line); }
.cm-fig > span { font-size: 13px; font-weight: 650; color: var(--ink-3); }
.cm-fig strong { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cm-fig.is-main strong { color: var(--gold-text); }
.cm-fig strong.is-pending { color: var(--ink); }
.cm-fig small { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.cm-fig small a { color: var(--gold-text); }
.cm-delta { display: inline-flex; align-items: center; gap: 4px; }
.cm-delta .icon { width: 14px; height: 14px; }
.cm-delta.up { color: var(--teal-text); }
.cm-delta.down { color: var(--terra-text); }

.cm-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.cm-chart { margin: 0; min-width: 0; }
.cm-chart figcaption, .cm-next h3 { margin: 0 0 14px; font-size: 13px; font-weight: 650; color: var(--ink-3); }
.cm-bars { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 180px; padding-top: 40px; border-bottom: 1px solid var(--line-2); }
.cm-bar { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; cursor: default; outline: none; }
.cm-bar i { width: min(100%, 26px); height: var(--h); border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--gold) 55%, var(--panel-2)); transition: background-color var(--t-fast) var(--ease); }
.cm-bar.is-now i { background: var(--gold); }
.cm-bar:hover i, .cm-bar:focus-visible i { background: var(--gold-hi); }
.cm-bar:focus-visible { box-shadow: 0 0 0 2px var(--gold) inset; border-radius: 6px; }
.cm-bar span { position: absolute; top: 100%; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.cm-bar.is-now span { color: var(--ink); font-weight: 700; }
.cm-tip { position: absolute; top: 0; left: 0; z-index: 2; display: grid; gap: 1px; padding: 7px 10px; border-radius: 8px; background: var(--raised); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line-2) inset; font-size: 12.5px; pointer-events: none; white-space: nowrap; }
.cm-tip b { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.cm-tip span { font-weight: 800; font-size: 14px; }
.cm-tip small { color: var(--ink-3); }
.cm-note { margin: 34px 0 0; font-size: 12px; color: var(--ink-3); }
.cm-empty { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.cm-empty .icon { flex: none; width: 18px; height: 18px; color: var(--gold-text); }
.cm-empty + .cm-note { margin-top: 10px; }

.cm-next ul { list-style: none; margin: 0; padding: 0; display: grid; }
.cm-next li + li { border-top: 1px solid var(--line); }
.cm-next a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; color: inherit; text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.cm-next a:hover { background: var(--panel-2); }
.cm-next a > div { display: grid; gap: 3px; min-width: 0; }
.cm-next b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-next small { font-size: 12.5px; color: var(--ink-3); }
.cm-next strong { flex: none; font-size: 14.5px; font-weight: 800; }
.cm-stage { color: var(--ink-2); font-weight: 650; }
.cm-none { margin: 0; font-size: 13.5px; color: var(--ink-3); }
@container (max-width: 860px) { .cm-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .cm-figs { grid-template-columns: minmax(0, 1fr); }
  .cm-fig + .cm-fig { border-left: 0; border-top: 1px solid var(--line); }
  .cm-cols { grid-template-columns: minmax(0, 1fr); }
  .cm-body { padding: 4px 16px 18px; }
  .cm-bars { gap: 3px; }
  .cm-bar span { font-size: 10px; }
  .cm-bar:nth-child(even) span { visibility: hidden; }
}

/* ---------- Listing page: clients this fits ---------- */
.cf-card h2 { display: flex; align-items: center; gap: 8px; }
.cf-n { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal-text); font-size: 12px; font-weight: 800; }
.cf-list { list-style: none; margin: 0; padding: 0; display: grid; }
.cf-list li { display: flex; align-items: center; gap: 8px; }
.cf-list li + li { border-top: 1px solid var(--line); }
.cf-who { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 12px 8px; margin: 0 -8px; border-radius: 10px; color: inherit; text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.cf-who:hover { background: var(--panel-2); }
.cf-ava { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--raised); color: var(--ink-2); font-size: 12.5px; font-weight: 800; box-shadow: 0 0 0 1px var(--line-2) inset; }
.cf-ava.hot { background: color-mix(in srgb, var(--terra) 22%, var(--raised)); color: var(--terra-text); }
.cf-main { display: grid; gap: 6px; min-width: 0; }
.cf-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cf-top b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-main .cl-checks-row .ok { color: var(--teal-text); }
.cf-main .cl-checks-row .no { color: var(--ink-3); }
.cf-call { flex: none; }
.cf-more { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
.cf-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cf-empty p { margin: 0; font-size: 13.5px; color: var(--ink-3); }

/* phones: deals toolbar fits the width; the first-run note stacks instead of squeezing its button */
@media (max-width: 640px) {
  .dl-acts { width: 100%; }
  .dl-acts .seg { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .dl-acts > .btn { flex: none; }
  .dl-intro { flex-wrap: wrap; align-items: flex-start; }
  .dl-intro div { flex: 1 1 calc(100% - 48px); }
  .dl-intro > .btn { width: 100%; justify-content: center; }
}

/* phones: a card's heading and its button share a row only when both fit; otherwise the button drops below */
@media (max-width: 640px) {
  .panel-head, .gl-head { flex-wrap: wrap; }
  .panel-head > div:first-child, .gl-head > div:first-child { flex: 1 1 180px; min-width: 0; }
  .panel-head > .btn, .gl-head > .btn { flex: none; }
  .gl-empty .chips button { height: auto; min-height: 34px; padding-block: 7px; white-space: normal; text-align: left; line-height: 1.3; }
  .dl-acts > .btn span { display: none; }
  .dl-acts > .btn { width: 44px; padding: 0; }
}
@media (max-width: 640px) {
  .hm-price .cur-sw { display: none; }
  .hm-list a { padding-inline: 16px; gap: 12px; }
}
@media (max-width: 420px) {
  .hm-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hm-actions .btn { width: 100%; }
}
/* phones: tab rows fill the width and shorten their labels instead of running off the edge */
@media (max-width: 640px) {
  .tabs { width: 100%; }
  .tabs button { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0 10px; gap: 6px; }
  .tabs button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tabs button .icon, .tabs button b { flex: none; }
}
@media (max-width: 640px) { .lg-pos { grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 40px); gap: 6px; } }
/* the phone keyboard is up: side sheets end where the keyboard starts, so their save button stays in reach */
html.kb-up dialog.sheet { height: calc(100dvh - var(--kb, 0px)); max-height: calc(100dvh - var(--kb, 0px)); }
@media (max-width: 640px) { .hx-band { flex-wrap: wrap; } .hx-band > div { flex: 1 1 200px; min-width: 0; } .hx-band > .btn { flex: none; } }
