/* Recursive MLS — design system (matches the Recursive handoff tokens).
   Space Grotesk (UI) + Space Mono (all numbers), one deep green over warm paper,
   hairline-inset cards (no drop shadow except elevated overlays), tight radii. */
:root {
  --brand: #006747;
  --brand-press: #00543a;
  --brand-tint: #eef4f1;
  --brand-badge: #e8f1ec;
  --on-green-soft: #9fe3c2;

  --canvas: #f4f3ef;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --surface: #f6f5f1;
  --cream: #e7e1d4;

  --ink: #1d241f;
  --body: #4a504a;
  --muted: #8a8e88;
  --label: #a8aca6;
  --faint: #bcbfba;

  --hair: #ececec;
  --hair-2: #f1f0ea;
  --hair-3: #f4f3ee;
  --control-border: #e2e0d8;

  --ok: #1f8a5b;
  --ok-bg: #e8f4ee;
  --warn-ink: #9a6a12;
  --warn-dot: #e0a020;
  --warn-bg: #fbf2dc;
  --orange: #c0612f;
  --orange-soft: #d97757;
  --orange-bg: #faf0e8;
  --danger: #b3261e;
  --danger-bg: #fbe9e7;
  --danger-border: #e7b3ac;

  --radius: 3px;
  --radius-ctrl: 7px;
  --pill: 999px;
  --hairline: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
  --shadow-float: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-overlay: 0 6px 24px rgba(0, 0, 0, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.55 "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-press); }
.muted { color: var(--muted); }
.num, .mono { font-family: "Space Mono", ui-monospace, Menlo, monospace; }
h1 { font-size: 25px; font-weight: 600; letter-spacing: -0.6px; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -0.2px; }

.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle; color: inherit; }
.ic-svg { width: 1.15em; height: 1.15em; display: block; }
.ic.filled .ic-svg { fill: currentColor; }

/* ── App shell ─────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 236px 1fr; grid-template-rows: 60px 1fr; height: 100vh; }
.content { grid-row: 2; grid-column: 2; overflow-y: auto; }
.content.pad { padding: 24px 30px 64px; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; grid-template-rows: 56px 1fr; } .nav { display: none; } .content { grid-column: 1; } .content.pad { padding: 18px; } }

.topbar { grid-column: 1 / 3; background: var(--brand); display: flex; align-items: center; gap: 16px; padding: 0 22px; z-index: 6; box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.tb-brand { display: flex; align-items: center; gap: 11px; width: 214px; flex: none; cursor: pointer; }
.tb-brand .mark { width: 32px; height: 32px; flex: none; }
.tb-brand .name { font-weight: 600; font-size: 19px; letter-spacing: -0.6px; color: #fff; }
.tb-brand .eyebrow { font-weight: 500; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.6); margin-left: 6px; }
.tb-search { flex: 1; max-width: 440px; display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 7px; padding: 9px 12px; }
.tb-search:focus-within { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.18); }
.tb-search input { flex: 1; border: 0; background: transparent; outline: 0; color: #fff; font: inherit; font-size: 13px; }
.tb-search input::placeholder { color: rgba(255,255,255,.6); }
.tb-search .ic { color: rgba(255,255,255,.8); }
.tb-search .kbd { font-size: 11px; color: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.2); border-radius: 4px; padding: 1px 6px; }
.tb-spacer { flex: 1; }
.tb-scope { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 7px; padding: 7px 11px; cursor: pointer; color: #fff; font-size: 12px; font-weight: 500; }
.tb-scope .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.tb-scope .ic { color: rgba(255,255,255,.75); }
.tb-iconbtn { position: relative; border: 0; background: transparent; cursor: pointer; display: flex; padding: 6px; color: rgba(255,255,255,.9); }
.tb-iconbtn .badge-dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn-dot); border: 1.5px solid var(--brand); }
.tb-iconbtn .badge-dot.ok { background: var(--ok); }
.tb-iconbtn .badge-dot.danger { background: var(--danger); }
.tb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--cream); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; cursor: pointer; flex: none; }

/* Header calendar-status dropdown */
.tb-pop-wrap { position: relative; display: flex; }
.tb-pop-back { position: fixed; inset: 0; z-index: 50; }
.tb-pop { position: absolute; top: calc(100% + 9px); right: 0; z-index: 51; width: 252px; background: var(--panel); color: var(--ink); border-radius: 9px; box-shadow: 0 12px 32px rgba(0,0,0,.18), var(--hairline); padding: 8px; }
.tb-pop-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 6px 8px 4px; }
.tb-pop-head .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tb-pop-head .dot.ok { background: var(--ok); }
.tb-pop-head .dot.danger { background: var(--danger); }
.tb-pop-sub { font-size: 11.5px; color: var(--muted); padding: 0 8px 8px; line-height: 1.45; }
.tb-pop-acct { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink); padding: 5px 8px; }
.tb-pop-acct .ic { color: var(--ok); width: 14px; height: 14px; flex: none; }
.tb-pop-acct > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pop-x { border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; color: var(--danger); padding: 2px 4px; flex: none; }
.tb-pop-x:hover { text-decoration: underline; }
.tb-pop-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); padding: 8px; border-radius: 6px; }
.tb-pop-item:hover { background: var(--hair-2); }
.tb-pop-item .ic { color: var(--brand); width: 16px; height: 16px; flex: none; }

.nav { grid-row: 2; grid-column: 1; background: var(--panel); border-right: 1px solid var(--hair); padding: 14px 12px; display: flex; flex-direction: column; overflow-y: auto; gap: 2px; }
.nav-group { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--label); padding: 16px 10px 7px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 7px; color: var(--body); font-size: 14px; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left; font-family: inherit; }
.nav-item .ic { color: var(--muted); }
.nav-item:hover { background: #f3f6f4; color: var(--ink); }
.nav-item.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.nav-item.active .ic { color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--brand); }
.nav-item .badge { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-badge); border-radius: 999px; padding: 1px 7px; }
.nav-foot { margin-top: auto; border-top: 1px solid var(--hair); padding-top: 10px; }

/* ── Page header + buttons ─────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
button, .btn { font: inherit; font-weight: 600; cursor: pointer; padding: 10px 16px; border-radius: var(--radius-ctrl); border: 1px solid var(--brand); background: var(--brand); color: #fff; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; transition: background .15s ease, border-color .15s ease; }
button:hover, .btn:hover { background: var(--brand-press); border-color: var(--brand-press); color: #fff; }
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
button.secondary, .btn.secondary { background: var(--panel); color: var(--brand); border-color: #d9d7cd; }
button.secondary:hover { background: var(--surface); border-color: var(--muted); color: var(--brand-press); }
button.ghost { background: transparent; color: var(--body); border-color: var(--control-border); }
button.ghost:hover { background: var(--surface); color: var(--ink); }
button.danger { background: var(--panel); color: var(--danger); border-color: var(--danger-border); }
button.danger:hover { background: var(--danger-bg); color: var(--danger); }
button.small { padding: 6px 11px; font-size: 12px; border-radius: 6px; }
button.link { background: none; border: 0; color: var(--brand); padding: 0; }
button.link:hover { background: none; color: var(--brand-press); }
.iconbtn { width: 36px; height: 36px; padding: 0; justify-content: center; background: #fff; color: var(--body); border: 1px solid var(--control-border); }
.iconbtn:hover { background: var(--surface); color: var(--ink); border-color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.viewall { border: 0; background: transparent; color: var(--brand); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; }

/* ── Cards / panels ────────────────────────────────────────────────────────── */
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--hairline); padding: 18px; }
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--hairline); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 18px; border-bottom: 1px solid var(--hair-2); }
.panel-head h2 { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.sample-tag { font-size: 10px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--label); background: var(--surface); border-radius: 999px; padding: 2px 8px; }

/* ── Status pill + compliance chip ─────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .3px; padding: 4px 9px; border-radius: 999px; line-height: 1; white-space: nowrap; }
.pill.active { background: var(--ok-bg); color: var(--ok); }
.pill.pending { background: var(--warn-bg); color: var(--warn-ink); }
.pill.drop { background: var(--orange-bg); color: var(--orange); }
.pill.new { background: var(--brand); color: #fff; }
.pill.neutral { background: #f0efe9; color: #6b706a; }
.cchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 8px; }
.cchip.high { color: var(--danger); background: var(--danger-bg); }
.cchip.medium { color: var(--warn-ink); background: var(--warn-bg); }
.cchip.clean { color: var(--ok); }

/* ── KPI / market strip ────────────────────────────────────────────────────── */
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1080px) { .kpi { grid-template-columns: repeat(2, 1fr); } }
.kpi-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--hairline); padding: 15px 16px; }
.kpi-card .lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); }
.kpi-card .val { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.kpi-card .n { font-size: 26px; font-weight: 600; letter-spacing: -0.8px; color: var(--ink); }
.kpi-card .delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.kpi-card .delta.up { color: var(--ok); }
.kpi-card .delta.down { color: var(--orange); }
.kpi-card .note { font-size: 11.5px; color: var(--faint); margin-top: 4px; }

/* ── Dashboard rows ────────────────────────────────────────────────────────── */
.lrow { display: flex; gap: 14px; align-items: center; padding: 13px 18px; cursor: pointer; }
.lrow + .lrow { border-top: 1px solid var(--hair-3); }
.lrow .thumb { width: 84px; height: 60px; border-radius: 3px; background: var(--cream) center/cover; flex: none; }
.lrow .main { flex: 1; min-width: 0; }
.lrow .top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.lrow .addr { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.lrow .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.lrow .metrics { display: flex; gap: 22px; flex: none; }
.metric { text-align: right; }
.metric .n { font-size: 14px; font-weight: 700; color: var(--ink); }
.metric .n.warn { color: var(--orange); }
.metric .l { font-size: 10px; color: var(--label); text-transform: uppercase; letter-spacing: .4px; }
.lrow .price { width: 120px; text-align: right; flex: none; }
.lrow .price .n { font-size: 16px; font-weight: 700; color: var(--brand); }
.lrow .price .open { font-size: 11px; color: var(--warn-ink); margin-top: 2px; }
@media (max-width: 1180px) { .lrow .metrics { display: none; } }

.mrow { display: flex; gap: 14px; align-items: center; padding: 13px 18px; cursor: pointer; }
.mrow + .mrow { border-top: 1px solid var(--hair-3); }
.mrow .thumb { width: 64px; height: 50px; border-radius: 3px; background: var(--cream) center/cover; flex: none; }
.mrow .change { font-size: 11px; font-weight: 600; }
.mrow .change.down { color: var(--orange); }
.mrow .change.up { color: var(--ok); }

/* timeline / pipeline / messages */
.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; color: var(--brand); flex: none; }
.tl-line { width: 1.5px; flex: 1; background: var(--hair); margin-top: 4px; }
.tl-body { flex: 1; padding-bottom: 14px; }
.tl-row { display: flex; justify-content: space-between; gap: 8px; }
.tl-time { font-size: 12.5px; color: var(--brand); font-weight: 700; }
.tl-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pl-item .pl-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pl-item .pl-sub { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.bar { height: 5px; border-radius: 3px; background: #eeede7; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.msg { display: flex; gap: 12px; align-items: flex-start; padding: 13px 18px; cursor: pointer; }
.msg + .msg { border-top: 1px solid var(--hair-3); }
.msg .av { width: 34px; height: 34px; border-radius: 50%; background: var(--cream); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.msg .av.unread { background: var(--brand); color: #fff; }
.msg .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 6px; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
label { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 11.5px; font-weight: 600; color: #6b706a; letter-spacing: .2px; }
.req { color: var(--danger); }
input, select, textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--control-border); border-radius: 7px; padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,103,71,.12); }
input::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
select { appearance: none; cursor: pointer; }
.selwrap { position: relative; }
.selwrap .chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 12px; }
@media (max-width: 700px) { .fgrid { grid-template-columns: repeat(4, 1fr); } }

/* ── Listing card (search result) ──────────────────────────────────────────── */
.lcard { background: #fff; border-radius: 4px; cursor: pointer; overflow: hidden; box-shadow: var(--hairline); transition: box-shadow .12s, transform .12s; }
.lcard:hover { box-shadow: var(--hairline), var(--shadow-float); transform: translateY(-1px); }
.lcard.sel { box-shadow: 0 0 0 2px var(--brand), 0 4px 14px rgba(0,0,0,.1); }
.lcard .img { position: relative; aspect-ratio: 3/2; background: var(--cream) center/cover; }
.lcard .img .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.lcard .pill-tl { position: absolute; top: 9px; left: 9px; }
.lcard .fav { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--body); padding: 0; }
.lcard .fav.on { color: var(--orange); }
.lcard .match { position: absolute; bottom: 9px; left: 9px; font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 999px; }
.lcard .b { padding: 14px; }
.lcard .price { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.5px; }
.lcard .facts { display: flex; gap: 11px; font-size: 12.5px; color: var(--body); margin: 6px 0 7px; }
.lcard .facts .sep { color: #e0ded6; }
.lcard .addr { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard .city { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.lcard .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.lcard .typ { font-size: 11.5px; color: var(--label); }
.lcard .shared { font-size: 11px; font-weight: 600; color: var(--orange); display: inline-flex; align-items: center; gap: 4px; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); }
.loading { padding: 56px; text-align: center; color: var(--muted); }
.banner { padding: 10px 14px; border-radius: 7px; margin-bottom: 14px; box-shadow: var(--hairline); background: var(--surface); font-size: 13px; }
.banner.err { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.banner.err ul, .banner.err li { margin: 0; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 22px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(28,28,28,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-overlay); padding: 22px; max-width: 520px; width: 100%; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 8px; box-shadow: var(--shadow-overlay); z-index: 60; font-size: 13px; }
.toast.err { background: var(--danger); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair-3); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; }
table.data th { color: var(--label); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; }
table.data tbody tr { border-top: 1px solid var(--hair-3); cursor: pointer; }
table.data tbody tr:hover td { background: var(--panel-2); }

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { max-width: 388px; width: 100%; }
.login-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; }
.login-brand .mark { width: 42px; height: 42px; }
.login-brand .name { font-weight: 600; font-size: 23px; letter-spacing: -.6px; color: var(--brand); }
.login-brand .eyebrow { font-weight: 500; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); display: block; }
.login-card h1 { font-size: 20px; margin-bottom: 2px; }
.login-card form label { margin-bottom: 12px; font-weight: 600; font-size: 13px; }
.login-card form label input { margin-top: 6px; }
.login-card button[type="submit"] { width: 100%; justify-content: center; margin-top: 4px; }
.login-foot { margin-top: 14px; text-align: center; font-size: 13px; }

/* ── Listing editor ────────────────────────────────────────────────────────── */
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-title { display: flex; align-items: center; gap: 12px; }
.ed-title h1 { font-size: 22px; letter-spacing: -0.5px; }
.ed-title .sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.status-chip.ok { background: var(--ok-bg); color: var(--ok); }
.status-chip.tips { background: var(--orange-bg); color: var(--orange); }
.status-chip.vios { background: var(--danger-bg); color: var(--danger); }
.ed-grid { display: grid; grid-template-columns: 186px 1fr; gap: 22px; align-items: start; }
.ed-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.ed-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 7px; font-size: 13.5px; color: var(--body); background: transparent; border: 0; width: 100%; text-align: left; font-family: inherit; cursor: pointer; }
.ed-nav-item .ic { color: var(--label); }
.ed-nav-item.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.ed-nav-item.active .ic { color: var(--brand); }
.ed-nav-item .flagdot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; }
.flagdot.v { background: var(--danger); }
.flagdot.t { background: var(--orange-soft); }
.ed-split { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 22px; align-items: start; min-width: 0; }
@media (max-width: 1180px) { .ed-grid { grid-template-columns: 1fr; } .ed-nav { position: static; flex-direction: row; flex-wrap: wrap; } .ed-split { grid-template-columns: 1fr; } }
.fcard { background: #fff; border-radius: 3px; box-shadow: var(--hairline); scroll-margin-top: 16px; }
.fcard-head { padding: 14px 18px; border-bottom: 1px solid var(--hair-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fcard-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.flags { display: flex; gap: 7px; align-items: center; }
.flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }
.flag.v { color: var(--danger); background: var(--danger-bg); }
.flag.t { color: var(--orange); background: var(--orange-bg); }
.flag.ok { color: var(--ok); }
.affix { position: relative; }
.affix .sign { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13.5px; color: var(--muted); font-family: "Space Mono", monospace; }
.affix input { padding-left: 24px; }
.ppsf { font-size: 12.5px; color: var(--muted); }
.ppsf strong { color: var(--body); font-family: "Space Mono", monospace; }
.desc-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--label); }
.ai { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 600; cursor: pointer; }
.photos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo { position: relative; aspect-ratio: 4/3; border-radius: 4px; background: var(--cream) center/cover; }
.photo .cover { position: absolute; top: 6px; left: 6px; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 6px; border-radius: 3px; }
.photo.add { border: 1.5px dashed #d9d7cd; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--muted); cursor: pointer; font-size: 11.5px; }
.feat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.feat-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; cursor: pointer; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--control-border); background: #fff; color: var(--body); }
.feat-chip.on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }

/* sqft confidence badge */
.sqft { border-radius: 6px; padding: 9px 11px; display: flex; flex-direction: column; gap: 7px; }
.sqft.ok { background: var(--ok-bg); }
.sqft.bad { background: var(--danger-bg); }
.sqft-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.sqft.ok .sqft-head { color: var(--ok); }
.sqft.bad .sqft-head { color: var(--danger); }
.sqft-head .pct { margin-left: auto; font-family: "Space Mono", monospace; font-weight: 700; }
.sqft-srcs { display: flex; flex-wrap: wrap; gap: 6px; }
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--body); background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 4px; padding: 2px 7px; }
.src .ic.yes { color: var(--ok); } .src .ic.no { color: var(--orange); }
.certify { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 11.5px; color: #6b706a; line-height: 1.4; }
.certify input { width: auto; margin-top: 2px; accent-color: var(--brand); }
.certify .warn { color: var(--warn-ink); }

/* compliance panel */
.cpanel { background: #fff; border-radius: 3px; box-shadow: var(--hairline); overflow: hidden; }
.cp-head { padding: 14px 16px; border-bottom: 1px solid var(--hair-2); }
.cp-headrow { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.cp-ic { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.cp-ic.ok { background: var(--ok-bg); color: var(--ok); }
.cp-ic.tips { background: var(--orange-bg); color: var(--orange); }
.cp-ic.vios { background: var(--danger-bg); color: var(--danger); }
.cp-head h2 { flex: 1; font-size: 14.5px; }
.cp-score { font-family: "Space Mono", monospace; font-size: 15px; font-weight: 700; }
.cp-bar { height: 6px; border-radius: 3px; background: #eeede7; overflow: hidden; }
.cp-bar > span { display: block; height: 100%; transition: width .3s, background .3s; }
.cp-counts { display: flex; gap: 14px; margin-top: 9px; font-size: 11.5px; }
.cp-count { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--muted); }
.cp-count .dot { width: 7px; height: 7px; border-radius: 50%; background: #cfd2cc; }
.cp-count.v { color: var(--danger); } .cp-count.v .dot { background: var(--danger); }
.cp-count.t { color: var(--orange); } .cp-count.t .dot { background: var(--orange-soft); }
.cp-allclear { padding: 16px; display: flex; align-items: center; gap: 9px; color: var(--ok); font-size: 13px; }
.cp-grouphead { padding: 9px 16px 7px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.cp-grouphead.v { color: var(--danger); background: #fdf4f3; }
.cp-grouphead.t { color: var(--label); background: var(--panel-2); border-top: 1px solid var(--hair-2); }
.cp-item { display: flex; gap: 11px; align-items: flex-start; padding: 11px 16px; cursor: pointer; border-top: 1px solid var(--hair-3); }
.cp-item:hover { background: var(--panel-2); }
.sevchip { font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-radius: 4px; padding: 3px 6px; flex: none; min-width: 50px; text-align: center; margin-top: 1px; }
.sevchip.high.v { color: var(--danger); background: var(--danger-bg); }
.sevchip.medium.v { color: var(--warn-ink); background: var(--warn-bg); }
.sevchip.low.v { color: #6b706a; background: #f0efe9; }
.sevchip.high.t { color: var(--orange); background: var(--orange-bg); }
.sevchip.medium.t { color: #2a6f8a; background: #e8f0f3; }
.sevchip.low.t { color: var(--ok); background: var(--ok-bg); }
.cp-item .lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.cp-item .cp-reason { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.cp-rules { border-top: 1px solid var(--hair-2); }
.cp-rules > button { width: 100%; display: flex; align-items: center; justify-content: space-between; background: transparent; border: 0; padding: 11px 16px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--brand); }
.cp-rules .body { padding: 0 16px 14px; }
.cp-rule { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--hair-3); }

/* live preview */
.pv-eyebrow { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--label); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.pv-card { background: #fff; border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.pv-hero { position: relative; aspect-ratio: 3/2; background: var(--cream) center/cover; }
.pv-hero .pill-tl { position: absolute; top: 10px; left: 10px; }
.pv-hero .fav { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; color: var(--body); }
.pv-hero .count { position: absolute; bottom: 10px; right: 10px; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 3px; }
.pv-body { padding: 16px; }
.pv-price { font-family: "Space Mono", monospace; font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.5px; }
.pv-facts { display: flex; gap: 14px; font-size: 13px; color: var(--body); margin: 8px 0 10px; }
.pv-facts .sep { color: #e0ded6; }
.pv-addr { font-size: 14px; font-weight: 600; color: var(--ink); }
.pv-city { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pv-desc { font-size: 12.5px; color: #6b706a; line-height: 1.55; margin: 11px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pv-feats .feat { font-size: 11.5px; color: var(--body); background: var(--canvas); border: 1px solid var(--hair); border-radius: 3px; padding: 3px 8px; }
.pv-agent { border-top: 1px solid var(--hair-2); margin-top: 14px; padding-top: 11px; display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.pv-agent .av { width: 26px; height: 26px; border-radius: 50%; background: var(--cream); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.pv-note { font-size: 11.5px; color: var(--label); text-align: center; margin-top: 9px; }

/* ── Find homes (buyer search) ─────────────────────────────────────────────── */
.bs { display: flex; flex-direction: column; height: 100%; }
.bs-top { flex: none; border-bottom: 1px solid var(--hair); background: #fff; }
.bs-toprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 20px; flex-wrap: wrap; }
.bs-client { display: flex; align-items: center; gap: 11px; }
.bs-client .av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.bs-client .name { font-size: 14px; font-weight: 600; color: var(--ink); }
.bs-client .sub { font-size: 12px; color: var(--muted); }
.bs-filters { display: flex; align-items: center; gap: 8px; padding: 0 20px 12px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 7px; background: var(--canvas); border: 1px solid #e7e5df; border-radius: 7px; padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.fchip .ic { color: var(--muted); }
.fchip.strong { background: #fff; color: var(--brand); font-weight: 600; }
.fchip.strong .ic { color: var(--brand); }
.bs-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.bs-sort b { color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.bs-split { flex: 1; display: grid; grid-template-columns: minmax(420px, 1.05fr) 1.35fr; min-height: 0; }
@media (max-width: 980px) { .bs-split { grid-template-columns: 1fr; } .bs-map { display: none; } }
.bs-cards { overflow-y: auto; padding: 16px 18px; background: var(--canvas); border-right: 1px solid var(--hair); }
.bs-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.bs-map { min-height: 0; position: relative; background: var(--brand-tint); }
.bs-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Listing price pills (MapKit custom annotation elements) */
.ll-pin { font-family: "Space Mono", monospace; font-weight: 700; font-size: 12px; line-height: 1; padding: 5px 9px; border: 0; border-radius: 999px; white-space: nowrap; cursor: pointer; background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: transform .1s, background .1s, color .1s; }
.ll-pin.on { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3); transform: scale(1.06); z-index: 6; }
.ll-pin.fav { color: var(--orange); outline: 1.5px solid var(--orange); }
.ll-pin.fav.on { color: #fff; outline: none; }

/* Cluster bubbles (brand green) */
.ll-cluster { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 13px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(0,0,0,.28); cursor: pointer; }
.ll-cluster.lg { background: var(--brand-press); }

/* Polygon-draw vertex dot */
.ll-vertex { width: 11px; height: 11px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); transform: translate(-50%, -50%); }

/* Floating map controls: "Search this area" + polygon draw (search this area / draw / finish) */
.map-tools { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); flex-wrap: wrap; justify-content: center; }
.map-tool { display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--brand); border: 1px solid #e7e5df; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.2); padding: 8px 16px; font-weight: 600; font-size: 13px; cursor: pointer; }
.map-tool:hover { color: var(--brand-press); }
.map-tool:disabled { opacity: .5; cursor: default; }
.map-tool.ghost { color: var(--body); }
.map-hint { background: rgba(11,59,46,.92); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.2); }

/* Local Logic Local Content widget stage (listing detail page) */
.ll-stage { height: min(60vh, 520px); border-radius: 10px; overflow: hidden; background: var(--brand-tint); }
.ll-stage > * { width: 100%; height: 100%; }

/* Local Logic Local Demographics panel — flows to its content height (not a fixed map) */
.ll-demographics { width: 100%; border-radius: 10px; overflow: hidden; }
.ll-demographics > * { width: 100%; }

/* ── Listing detail (RDS8 design) ───────────────────────────────────────────── */
.ld { --ld-line: rgba(0,0,0,.07); }
.ld-bar { position: sticky; top: 0; z-index: 12; background: #fff; border-bottom: 1px solid #ececec; display: flex; align-items: center; gap: 12px; padding: 0 4px; height: 56px; margin-bottom: 14px; }
.ld-bar .link { font-size: 13.5px; }
.ld-bar-sep { width: 1px; height: 22px; background: #ececec; }
.ld-bar-mls { font-size: 12.5px; color: var(--muted, #8a8e88); }
.ld-bar-mls b { color: var(--brand); font-weight: 600; }
.grow { flex: 1; }
.ld-bar-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-actbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 116px; height: 38px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand); background: #fff; border: 1px solid #d7ddd9; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.ld-actbtn:hover { background: var(--brand-tint); }

.ld-wrap { max-width: 1180px; margin: 0 auto; }
.ld-gal { display: grid; grid-template-columns: 2fr 1fr; gap: 9px; height: min(46vh, 392px); }
.ld-gal-hero, .ld-gal-cell { border-radius: 4px; background: var(--cream) center/cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.ld-gal-side { display: grid; grid-template-rows: 1fr 1fr; gap: 9px; min-height: 0; }
.ld-gal-empty { height: 280px; border-radius: 4px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.ld-thumbs { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.ld-thumb { width: 60px; height: 44px; border-radius: 4px; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--cream) center/cover no-repeat; }
.ld-thumb.on { border-color: var(--brand); }

.ld-card { background: #fff; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--ld-line); padding: 20px; }
.ld-sec { margin-top: 18px; }
.ld-seclabel { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #8a8e88; margin-bottom: 10px; }
.ld-src { font-size: 10.5px; color: var(--faint); margin-top: 12px; }
.ld-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ld-sec-note { font-size: 11.5px; color: #a8aca6; }

.ld-mls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; background: #fff; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--ld-line); }
.ld-mls-l, .ld-mls-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ld-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #a8aca6; }
.ld-mlsno { font-family: "Space Mono", monospace; font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.ld-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid #e2e0d8; background: #fff; cursor: pointer; color: #8a8e88; }
.ld-partner { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; color: #8a8e88; background: #fff; border: 1px solid #e7e5df; border-radius: 6px; cursor: pointer; }
.ld-partner:hover { color: var(--brand); border-color: var(--brand); }

.ld-title { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 22px 0 4px; }
.ld-price { font-family: "Space Mono", monospace; font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -1px; }
.ld-addr { font-size: 18px; font-weight: 600; color: var(--ink); margin-top: 5px; }
.ld-city { font-size: 13.5px; color: #8a8e88; margin-top: 2px; }
.ld-specs { display: flex; gap: 20px; font-size: 14.5px; color: var(--body); flex-wrap: wrap; }
.ld-specs span { display: inline-flex; align-items: center; gap: 6px; }
.ld-specs .ic { color: #8a8e88; }

.ld-body { display: grid; grid-template-columns: 1fr 312px; gap: 26px; align-items: start; margin-top: 18px; }
.ld-remarks { margin: 0; font-size: 14px; color: var(--body); line-height: 1.65; white-space: pre-wrap; }

.ld-facts, .ld-tax { display: grid; gap: 1px; background: #ececec; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px #ececec; }
.ld-facts { grid-template-columns: 1fr 1fr 1fr; }
.ld-tax { grid-template-columns: repeat(3, 1fr); }
.ld-fact { background: #fff; padding: 12px 14px; }
.ld-fact .k { font-size: 10.5px; color: #8a8e88; text-transform: uppercase; letter-spacing: .5px; }
.ld-fact .v { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.ld-fact .v.num { font-family: "Space Mono", monospace; font-size: 15px; }

.ld-agent { margin-top: 18px; padding: 20px; border-radius: 3px; box-shadow: inset 0 0 0 1px #d6e7de; background: #f3f8f5; }
.ld-agent-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--brand); }
.ld-agent-tag { font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--brand); background: #e1efe8; border-radius: 4px; padding: 2px 7px; }
.ld-agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 22px; }
.ld-agent-grid .k { font-size: 10.5px; color: #8a8e88; text-transform: uppercase; letter-spacing: .5px; }
.ld-agent-grid .v { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* price timeline */
.ld-tl { position: relative; height: 150px; margin: 6px 8px 34px; }
.ld-tl-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #d2dccf; }
.ld-tl-pt { position: absolute; transform: translate(-50%, -50%); text-align: center; }
.ld-tl-pt .p { font-family: "Space Mono", monospace; font-size: 11.5px; font-weight: 700; color: var(--ink); white-space: nowrap; margin-bottom: 6px; }
.ld-tl-pt .dot { display: block; width: 13px; height: 13px; border-radius: 50%; margin: 0 auto; border: 2.5px solid #fff; box-shadow: 0 0 0 1px currentColor; }
.ld-tl-lbl { position: absolute; bottom: -30px; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.ld-tl-lbl .d { font-size: 12px; font-weight: 600; color: var(--ink); }
.ld-tl-lbl .t { font-size: 11px; }

.ld-hist { padding: 6px; }
.ld-hist-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-bottom: 1px solid #f4f3ee; }
.ld-hist-row:last-child { border-bottom: 0; }
.ld-hist-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ld-hist-mid { flex: 1; min-width: 0; }
.ld-hist-mid .e { font-size: 13px; font-weight: 600; color: var(--ink); }
.ld-hist-mid .d { font-size: 11.5px; color: #a8aca6; }
.ld-hist-price { font-family: "Space Mono", monospace; font-size: 12.5px; color: var(--body); text-align: right; }

.ld-demo-h { margin: 0 0 14px; font-size: 26px; font-weight: 600; letter-spacing: -.6px; color: var(--ink); }

.ld-rail { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 16px; }
.ld-rcard { background: #fff; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--ld-line); padding: 16px; }
.ld-agentcard { display: flex; align-items: center; gap: 12px; }
.ld-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex: none; }
.ld-agentmeta .n { font-size: 14px; font-weight: 600; color: var(--ink); }
.ld-agentmeta .o { font-size: 12px; color: #8a8e88; }
.ld-railbtn { width: 100%; justify-content: center; margin-top: 14px; }

/* Comparable sales (rail) — one tappable row per comp. */
.ld-comp { display: block; padding: 10px 0; border-top: 1px solid var(--ld-line); cursor: pointer; }
.ld-comp:first-of-type { border-top: 0; padding-top: 4px; }
.ld-comp:hover .ld-comp-addr { color: var(--brand); }
.ld-comp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ld-comp-price { font-family: "Space Mono", monospace; font-size: 14px; font-weight: 700; color: var(--ink); }
.ld-comp-dist { font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 1px 8px; white-space: nowrap; flex: none; }
.ld-comp-addr { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-comp-why { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.ld-comp-meta { font-size: 11.5px; color: var(--faint); margin-top: 2px; }

/* Listing activity (rail) — first-party engagement counters. */
.ld-stats { display: flex; gap: 8px; }
.ld-stat { flex: 1; text-align: center; background: var(--surface); border-radius: 6px; padding: 10px 6px; }
.ld-stat .n { font-size: 20px; font-weight: 700; letter-spacing: -.5px; color: var(--ink); }
.ld-stat .l { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 2px; }

/* Flood risk (main column) — neutral by default, amber when in an SFHA. */
.ld-flood { display: flex; align-items: flex-start; gap: 12px; }
.ld-flood-ic { color: var(--brand); flex: none; display: flex; }
.ld-flood-ic svg { width: 22px; height: 22px; }
.ld-flood-zone { font-size: 14px; font-weight: 600; color: var(--ink); }
.ld-flood-note { font-size: 12.5px; color: var(--body); margin-top: 3px; line-height: 1.45; }
.ld-flood.is-sfha { background: var(--warn-bg); box-shadow: inset 0 0 0 1px #ecd9a6; }
.ld-flood.is-sfha .ld-flood-ic { color: var(--warn-ink); }
.ld-flood.is-sfha .ld-flood-zone { color: var(--warn-ink); }

/* AI-estimated badge + grounding citations (parcel/sales history). */
.ld-aibadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid #ecd9a6; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.ld-aibadge svg { width: 12px; height: 12px; }
.ld-cites { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ld-line); font-size: 11.5px; line-height: 1.7; }
.ld-cites-l { color: var(--muted); margin-right: 6px; }
.ld-cites a { color: var(--brand); margin-right: 10px; word-break: break-word; }

@media (max-width: 900px) {
  .ld-body { grid-template-columns: 1fr; }
  .ld-rail { position: static; }
  .ld-facts { grid-template-columns: 1fr 1fr; }
  .ld-tax { grid-template-columns: 1fr 1fr; }
}

/* Missing-credentials / error placeholder (covers the map pane) */
.map-needkey { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 28px; color: var(--muted); background: var(--brand-tint); }
.map-needkey .ic { color: var(--brand); width: 28px; height: 28px; }
.map-needkey b { color: var(--ink); font-size: 15px; }
.map-needkey span { max-width: 340px; font-size: 13px; }
.map-needkey code { font-family: "Space Mono", monospace; background: var(--brand-badge); color: var(--brand-press); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* ── Compatibility: listing detail, browse toolbar, misc (secondary views) ───── */
.card { margin-bottom: 16px; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar label { margin: 0; }
.toolbar .grow { flex: 1; min-width: 160px; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .detail-grid { grid-template-columns: 1fr; } }
.gallery { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); overflow: hidden; }
.gallery .hero { aspect-ratio: 16/10; background: var(--cream) center/cover; position: relative; }
.gallery .hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .hero .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.gallery .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); border: 0; display: flex; align-items: center; justify-content: center; padding: 0; }
.gallery .nav-btn.l { left: 10px; } .gallery .nav-btn.r { right: 10px; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs img { width: 76px; height: 56px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: .7; }
.thumbs img.on { opacity: 1; box-shadow: 0 0 0 2px var(--brand); }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.spec .s { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; }
.spec .s .n { font-size: 18px; font-weight: 600; }
.spec .s .l { color: var(--muted); font-size: 12px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface); color: var(--body); }
.tag.brand { color: var(--brand); background: var(--brand-tint); }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }

/* ── Market Insights ─────────────────────────────────────────────────────── */
@keyframes mi-spin { to { transform: rotate(360deg); } }
.mi { padding: 22px 28px 60px; max-width: 1340px; margin: 0 auto; }
.mi .brand { color: var(--brand); }
.mi .mut { color: var(--muted); }
.mi .num { font-family: "Space Mono", monospace; }
.mi-titlerow { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.mi-titlerow h1 { margin: 0; font-size: 25px; font-weight: 600; letter-spacing: -.6px; color: var(--ink); }
.mi-titlerow .sub { margin: 5px 0 0; font-size: 14px; color: var(--muted); }
.mi-titlerow .actions { display: flex; gap: 10px; }
.mi-livenote { display: flex; align-items: flex-start; gap: 9px; background: var(--brand-tint); border-radius: 8px; padding: 10px 13px; margin-bottom: 14px; font-size: 12.5px; color: var(--body); line-height: 1.5; }
.mi-livenote .ic { color: var(--brand); margin-top: 1px; }

.mi-areas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel); border-radius: 3px; box-shadow: var(--hairline); padding: 12px 14px; margin-bottom: 12px; }
.mi-areas-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); flex: none; }
.mi-areas-meta { font-size: 12px; color: var(--faint); }
.area-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 9px 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid #e2e0d8; background: #fff; color: var(--body); }
.area-chip:hover { background: #fff; border-color: var(--muted); color: var(--body); }
.area-chip.on, .area-chip.on:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.area-chip .x { display: inline-flex; opacity: .5; }
.area-chip .x:hover { opacity: 1; }
.area-add { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px dashed #c8c6bc; background: #fff; color: var(--brand); }
.area-add:hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }

.mi-filters { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); padding: 3px; }
.seg button { font-size: 12.5px; font-weight: 600; border: 0; border-radius: 6px; padding: 6px 13px; background: transparent; color: var(--body); }
.seg button:hover { background: var(--surface); color: var(--ink); }
.seg button.on, .seg button.on:hover { background: var(--brand); color: #fff; }
.mi-pill, .mi-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 8px 12px; border-radius: 8px; border: 1px solid #e2e0d8; background: #fff; color: var(--body); }
.mi-pill:hover, .mi-toggle:hover { background: var(--surface); border-color: var(--muted); color: var(--ink); }
.mi-toggle.on, .mi-toggle.on:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.mi-updated { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }

.pop-backdrop { position: fixed; inset: 0; z-index: 30; }
.pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 31; background: #fff; border-radius: 8px; box-shadow: var(--shadow-pop), inset 0 0 0 1px rgba(0,0,0,.06); padding: 8px; text-align: left; }
.pop-title { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 6px 8px; }
.pop-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.pop-item:hover { background: var(--surface); }
.pop-check { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.pop-check:hover { background: var(--surface); }
.pop-check input { accent-color: var(--brand); }
.pop-search { display: flex; align-items: center; gap: 8px; background: var(--canvas); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.pop-search input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: 13px; }
.pop-area { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 6px; cursor: pointer; }
.pop-area:hover { background: var(--surface); }
.pop-area .n { font-size: 13px; font-weight: 600; color: var(--ink); }
.pop-area .t { font-size: 11.5px; color: var(--faint); }

.mi-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.mi-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { background: #fff; border-radius: 3px; box-shadow: var(--hairline); padding: 13px 15px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.kpi-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 999px; }
.kpi-tag.live { color: var(--brand); background: var(--brand-tint); }
.kpi-tag.est { color: #8a8e88; background: #f1f0ea; }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 7px; }
.kpi-val { font-size: 23px; font-weight: 700; letter-spacing: -.8px; color: var(--ink); line-height: 1; }
.kpi-delta { font-size: 11.5px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 3px; }
.kpi-delta.up { color: #1f8a5b; }
.kpi-delta.down { color: #c0612f; }
.kpi-delta .yoy { color: #bcbfba; font-weight: 400; }

.mi-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card { background: #fff; border-radius: 3px; box-shadow: var(--hairline); padding: 15px 18px 12px; min-width: 0; }
.chart-card.full { grid-column: 1 / -1; }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.cc-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.cc-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.cc-action { font-size: 13px; font-weight: 700; color: var(--brand); }
.legend { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--body); }
.legend .sw { width: 12px; height: 9px; border-radius: 2px; }
.legend .sw.dash { height: 0; border-top: 2px dashed #a8aca6; border-radius: 0; }
.gauges { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center; }
.gauge-cell { text-align: center; }
.gauge-cap { font-size: 12px; font-weight: 600; margin-top: -6px; }
.gauge-cap.mut { color: var(--muted); font-weight: 400; }

.q-bars { display: flex; gap: 10px; align-items: flex-end; height: 132px; }
.q-bar { flex: 1; display: flex; flex-direction: column; align-items: center; background: transparent; border: 0; height: 100%; justify-content: flex-end; padding: 0; }
.q-bar:hover { background: transparent; }
.q-count { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.q-fill { width: 100%; border-radius: 3px 3px 0 0; transition: all .15s; }
.q-bar.on .q-fill { box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.q-lab { margin-top: 7px; text-align: center; }
.q-q { font-size: 12px; font-weight: 700; color: var(--body); }
.q-q.on { color: var(--ink); }
.q-band { font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.q-drill { margin-top: 14px; border-top: 1px solid var(--hair-3); padding-top: 13px; }
.q-drill-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.q-dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.q-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.mut2 { font-size: 12px; color: var(--faint); }
.q-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.q-stat { background: #f7f6f1; border-radius: 6px; padding: 9px 10px; }
.q-stat .l { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.q-stat .v { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 3px; }
.q-stat .sub { font-size: 10.5px; color: var(--faint); margin-top: 1px; }

.mi-rail { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.mi-card { background: #fff; border-radius: 3px; box-shadow: var(--hairline); overflow: hidden; }
.mi-card-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--hair-3); }
.mi-card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); flex: 1; }
.ic-circle { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.ic-circle.green { background: var(--brand-tint); color: var(--brand); }
.ic-circle.orange { background: var(--orange-bg); color: var(--orange); }
.mi-active-pill { font-size: 11.5px; font-weight: 600; color: #1f8a5b; background: #e8f4ee; border-radius: 999px; padding: 2px 8px; }

.ask-input { display: flex; gap: 8px; align-items: flex-end; background: #f7f6f1; border-radius: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--hair); }
.ask-input textarea { flex: 1; border: 0; background: transparent; outline: 0; resize: none; font: inherit; font-size: 13px; color: var(--ink); line-height: 1.4; min-height: 0; }
.ask-send { width: 32px; height: 32px; border-radius: 7px; border: 0; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.ask-sugg { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.ask-sugg button { text-align: left; font-size: 12.5px; color: var(--brand); background: #f4f6f4; border: 1px solid #e6ece8; border-radius: 7px; padding: 8px 11px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ask-sugg button:hover { background: #eef4f0; color: var(--brand); border-color: #d9e6df; }
.ask-loading { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ask-answer { font-size: 13px; color: #2d332e; line-height: 1.55; background: #f7f6f1; border-radius: 8px; padding: 12px 13px; border-left: 2.5px solid var(--brand); white-space: pre-wrap; }
.ask-actions { display: flex; gap: 14px; margin-top: 9px; }
.ask-actions button { font-size: 12px; font-weight: 600; color: var(--brand); background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.ask-actions button:hover { background: none; color: var(--brand-press); }
.ask-actions button.mut { color: var(--muted); }
.spin { animation: mi-spin 1s linear infinite; display: inline-flex; }

.digest-prev { padding: 13px 15px; border-bottom: 1px solid var(--hair-3); }
.dp-eyebrow { font-size: 11px; color: var(--faint); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.dp-eyebrow strong { color: var(--body); font-weight: 600; }
.dp-card { border-radius: 8px; overflow: hidden; box-shadow: var(--hairline); }
.dp-band { background: var(--brand); padding: 11px 13px; color: #fff; }
.dp-kicker { font-size: 9.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; opacity: .7; }
.dp-title { font-size: 15px; font-weight: 600; margin-top: 3px; }
.dp-body { padding: 12px 13px; background: #fff; }
.dp-copy { font-size: 12px; color: var(--body); line-height: 1.5; }
.dp-copy .up { color: #1f8a5b; }
.dp-tiles { display: flex; gap: 8px; margin-top: 10px; }
.dp-tile { flex: 1; background: #f7f6f1; border-radius: 6px; padding: 8px 9px; }
.dp-tile .l { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dp-tile .v { font-size: 14px; font-weight: 700; color: var(--ink); }
.dp-foot { font-size: 11px; color: var(--faint); text-align: center; margin-top: 7px; }
.digest-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 15px; border-top: 1px solid var(--hair-2); cursor: pointer; }
.digest-row:first-child { border-top: 0; }
.digest-row.on { background: #f6f8f6; }
.dr-av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none; margin-top: 1px; }
.dr-av.off { background: #d8d6cd; }
.dr-top { display: flex; align-items: center; gap: 7px; }
.dr-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.dr-deal { font-size: 10px; font-weight: 600; border-radius: 4px; padding: 1px 6px; }
.dr-deal.buy { color: #2a6f8a; background: #e8f0f3; }
.dr-deal.sell { color: #c0612f; background: #faece3; }
.dr-scope { display: inline-flex; background: #f1f0ea; border-radius: 7px; padding: 2px; margin-top: 6px; }
.dr-scope button { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; border: 0; border-radius: 5px; padding: 4px 8px; background: transparent; color: var(--muted); }
.dr-scope button:hover { background: transparent; color: var(--body); }
.dr-scope button.on, .dr-scope button.on:hover { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.dr-sub { font-size: 11.5px; color: var(--faint); display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.dr-sub .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 999px; border: 0; background: #d2d0c7; flex: none; padding: 0; margin-top: 2px; transition: background .15s; }
.switch:hover { background: #c8c6bc; }
.switch.on, .switch.on:hover { background: var(--brand); }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on .knob { left: 16px; }
.dashed-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 7px; border: 1px dashed #c8c6bc; background: #fff; color: var(--brand); }
.dashed-btn:hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }

@media (max-width: 1180px) {
  .mi-grid { grid-template-columns: 1fr; }
  .mi-rail { position: static; }
  .mi-charts { grid-template-columns: 1fr; }
  .mi-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ── Market KPI cards (own class to avoid the .kpi dashboard-grid collision) ── */
.mi-kpi { background: #fff; border-radius: 3px; box-shadow: var(--hairline); padding: 13px 15px; }
.mi-kpi .kpi-val { margin-top: 7px; }
.kpi-hint { font-size: 11px; color: var(--faint); margin-top: 5px; }

/* ── Client digests (per-contact saved searches / market updates) ───────────── */
.cd-section { margin: 18px 0 4px; padding-top: 16px; border-top: 1px solid var(--hair-2); }
.cd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cd-head h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); margin: 0; }
.cd-hint { font-size: 11.5px; color: var(--muted); }
.cd-group { margin-bottom: 12px; }
.cd-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #6b706a; letter-spacing: .2px; margin-bottom: 6px; }
.cd-empty { font-size: 12.5px; color: var(--muted); padding: 6px 0; }
.cd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--hair-2); border-radius: 7px; margin-bottom: 6px; }
.cd-row strong { display: block; font-size: 13.5px; color: var(--ink); }
.cd-sum { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cd-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--body); margin-top: 12px; }
.cd-check input { width: auto; }

/* ── Clients CRM (master/detail people layer) ──────────────────────────────── */
.cr { display: flex; flex-direction: column; height: 100%; }
.cr-head { flex: none; padding: 18px 24px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cr-head h1 { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -.5px; color: var(--ink); }
.cr-head .sub { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.cr-head .acts { display: flex; gap: 10px; }
.cr-grid { flex: 1; display: grid; grid-template-columns: minmax(360px, .9fr) 1.6fr; min-height: 0; padding: 16px 24px 16px; }
@media (max-width: 980px) { .cr-grid { grid-template-columns: 1fr; } }

.cr-list { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-radius: 3px 0 0 3px; box-shadow: var(--hairline); }
.cr-filter { padding: 12px 14px; border-bottom: 1px solid var(--hair-2); display: flex; flex-direction: column; gap: 10px; }
.cr-search { display: flex; align-items: center; gap: 8px; background: var(--canvas); border-radius: 7px; padding: 8px 11px; }
.cr-search input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: 13px; }
.cr-seg { display: flex; align-items: center; gap: 6px; }
.cr-seg .segbtn { font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 0; border-radius: 6px; padding: 5px 11px; background: transparent; color: var(--muted); }
.cr-seg .segbtn.on { background: var(--brand-tint); color: var(--brand); }
.cr-sortbtn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; color: #6b706a; background: transparent; border: 0; cursor: pointer; padding: 0; }
.cr-rows { flex: 1; overflow-y: auto; }
.cr-row { display: flex; gap: 11px; align-items: center; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--hair-3); border-left: 2.5px solid transparent; }
.cr-row:hover { background: var(--panel-2); }
.cr-row.sel { background: #f3f6f4; border-left-color: var(--brand); }
.cr-row .nm { display: flex; align-items: center; gap: 7px; }
.cr-row .nm span { font-size: 14px; font-weight: 600; color: var(--ink); }
.cr-row .meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cr-role { font-size: 11.5px; color: var(--faint); }
.cr-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.cr-tags .t { font-size: 10.5px; color: #6b706a; background: var(--canvas); border: 1px solid var(--hair); border-radius: 4px; padding: 1px 6px; }
.cr-tags .more { font-size: 10.5px; color: var(--label); }

.cr-avatar { border-radius: 50%; background: var(--cream); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.cr-avatar.sm { width: 38px; height: 38px; font-size: 13px; }
.cr-avatar.md { width: 36px; height: 36px; font-size: 13px; }
.cr-avatar.lg { width: 52px; height: 52px; font-size: 18px; background: var(--brand); color: #fff; }

.cr-stage { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.cr-band { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

.cr-detail { display: flex; flex-direction: column; min-height: 0; background: var(--panel-2); border-radius: 0 3px 3px 0; box-shadow: var(--hairline); }
.cr-dhead { flex: none; padding: 18px 22px 0; border-bottom: 1px solid var(--hair-2); background: var(--panel); border-radius: 0 3px 0 0; }
.cr-dtop { display: flex; align-items: flex-start; gap: 14px; }
.cr-dtop h2 { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); }
.cr-contact { display: flex; align-items: center; gap: 14px; margin-top: 5px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.cr-contact span { display: inline-flex; align-items: center; gap: 5px; }
.cr-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.cr-tabs { display: flex; gap: 4px; margin-top: 16px; }
.cr-tab { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 0; background: transparent; padding: 9px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cr-tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.cr-dbody { flex: 1; overflow-y: auto; padding: 20px; }

.cr-card { background: var(--panel); border-radius: 3px; box-shadow: var(--hairline); margin-bottom: 14px; }
.cr-card-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--hair-2); }
.cr-card-h h3 { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cr-card-b { padding: 16px; }
.cr-card-b.flush { padding: 0; }
.cr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .cr-two { grid-template-columns: 1fr; } }

.cr-part { margin-bottom: 11px; }
.cr-part .lbl { display: flex; justify-content: space-between; margin-bottom: 5px; }
.cr-part .lbl .k { font-size: 12.5px; color: var(--body); font-weight: 500; }
.cr-part .lbl .k .d { color: var(--faint); font-weight: 400; }
.cr-part .lbl .v { font-size: 12px; font-weight: 700; color: #6b706a; font-family: "Space Mono", monospace; }
.cr-track { height: 5px; border-radius: 3px; background: #eeede7; overflow: hidden; }
.cr-track > span { display: block; height: 100%; opacity: .85; }
.cr-note { font-size: 11px; color: var(--label); margin-top: 12px; }

.cr-chiprow { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.cr-tagchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 5px 10px; }
.cr-tagchip .x { display: inline-flex; cursor: pointer; opacity: .6; }
.cr-addtag-wrap { position: relative; }
.cr-addtag { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: #fff; border: 1px dashed #c8c6bc; border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.cr-pop { position: absolute; top: calc(100% + 6px); left: 0; width: 200px; max-height: 200px; overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: var(--shadow-overlay); padding: 6px; z-index: 20; }
.cr-pop .opt { padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--ink); }
.cr-pop .opt:hover { background: var(--brand-tint); }

.cr-snaprow { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--hair-3); font-size: 12.5px; }
.cr-snaprow .k { color: var(--muted); }
.cr-snaprow .v { color: var(--ink); font-weight: 600; }

.cr-freq { display: inline-flex; background: var(--hair-2); border-radius: 7px; padding: 2px; }
.cr-freq button { font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; border: 0; border-radius: 5px; padding: 4px 10px; background: transparent; color: var(--muted); }
.cr-freq button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

.cr-srow { padding: 13px 16px; border-top: 1px solid var(--hair-3); }
.cr-srow:first-child { border-top: 0; }
.cr-srow .top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cr-srow .top .nm { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cr-srow .top .ct { font-size: 12px; color: var(--muted); margin-top: 1px; }
.cr-srow .freqline { display: flex; align-items: center; gap: 7px; margin-top: 10px; }
.cr-srow .freqline .albl { font-size: 11px; color: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

.cr-homes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .cr-homes { grid-template-columns: 1fr; } }
.cr-home { display: flex; gap: 11px; padding: 11px; border-radius: 6px; box-shadow: var(--hairline); }
.cr-home .ic { width: 44px; height: 44px; border-radius: 5px; background: var(--cream); display: flex; align-items: center; justify-content: center; flex: none; color: var(--brand); }
.cr-home .addr { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-home .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cr-home .price { font-family: "Space Mono", monospace; font-size: 13px; font-weight: 700; color: var(--brand); margin-top: 3px; }

.cr-member { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 7px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 8px; }
.cr-member.cur { box-shadow: inset 0 0 0 1.5px var(--brand); }
.cr-member .nm { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cr-member .sub { font-size: 11.5px; color: var(--muted); }
.cr-dashed { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand); background: #fff; border: 1px dashed #c8c6bc; border-radius: 7px; padding: 9px; cursor: pointer; }

.cr-cross-intro { font-size: 13px; color: #2d332e; line-height: 1.55; margin-bottom: 13px; }
.cr-cross { display: flex; align-items: center; gap: 12px; padding: 11px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 8px; }
.cr-cross.both { box-shadow: inset 0 0 0 1.5px #cfe0d7; background: #f4f6f4; }
.cr-cross .reason { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11px; font-weight: 600; }
.cr-aibadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 3px 9px; }

.cr-act { display: flex; gap: 12px; }
.cr-act .rail { display: flex; flex-direction: column; align-items: center; }
.cr-act .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--canvas); display: flex; align-items: center; justify-content: center; flex: none; }
.cr-act .line { width: 1.5px; flex: 1; background: var(--hair); margin-top: 4px; }
.cr-act .body { flex: 1; padding-top: 4px; }
.cr-act .body .tx { font-size: 13px; color: var(--ink); }
.cr-act .body .ago { font-size: 11.5px; color: var(--faint); margin-top: 1px; }

.cr-mini-ring { flex: none; }
.cr-share { margin-top: 6px; font: inherit; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border: 0; border-radius: 6px; padding: 4px 9px; cursor: pointer; }

/* ── Offers (offer management) ──────────────────────────────────────────────── */
.of-lab { font-size: 11.5px; font-weight: 600; color: var(--body); display: block; margin-bottom: 6px; }
.of-inp { width: 100%; box-sizing: border-box; border: 1px solid var(--control-border); border-radius: 7px; padding: 9px 11px; font-family: inherit; font-size: 13.5px; color: var(--ink); background: #fff; outline: none; }
.of-inp:focus { border-color: var(--brand); }
.of-section { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--label); margin-bottom: 12px; }
.of-term { background: #fff; border-radius: 6px; padding: 10px 12px; box-shadow: var(--hairline); }
.of-term .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.of-term .v { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.of-term .v.strong { font-size: 16px; font-weight: 700; color: var(--brand); }
.of-rl { padding: 11px 14px; border-bottom: 1px solid var(--hair-2); font-size: 12px; font-weight: 600; color: var(--body); text-transform: uppercase; letter-spacing: .4px; position: sticky; left: 0; background: #faf9f5; white-space: nowrap; }
.of-rl .of-sub { font-size: 10px; font-weight: 400; color: var(--label); text-transform: none; letter-spacing: 0; margin-top: 1px; }
.of-cell { padding: 11px 14px; border-bottom: 1px solid var(--hair-2); font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }

/* consumer reCURSIVE eSign chips */
.sg-chip { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--control-border); background: #fff; color: var(--body); }

/* ── Knowledgebase / LMS ───────────────────────────────────────────────────── */
.kb-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 28px 64px; }
.kb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.kb-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.kb-h1 { margin: 0; font-size: 27px; font-weight: 600; letter-spacing: -.6px; color: var(--ink); }
.kb-sub { margin: 5px 0 0; font-size: 14px; color: var(--muted); }
.kb-searchbox { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--control-border); border-radius: 8px; padding: 9px 13px; min-width: 280px; }
.kb-searchbox input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: 13px; color: var(--ink); }
.kb-searchbox .ic { color: var(--label); }
.kb-sectitle { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--ink); }
.kb-sectitle .ic { color: var(--brand); }
.kb-soon { font-size: 11px; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border-radius: 4px; padding: 2px 7px; letter-spacing: .3px; }
.kb-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kb-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kb-block { margin-bottom: 30px; }
.kb-path { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.kb-path-top { display: flex; align-items: center; justify-content: space-between; }
.kb-path-ic { width: 38px; height: 38px; border-radius: 8px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--brand); }
.kb-path-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.kb-path-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.kb-ce { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #16243A; background: #eef1f6; border-radius: 4px; padding: 2px 7px; }
.kb-bar { height: 6px; border-radius: 4px; background: #eef0ec; overflow: hidden; }
.kb-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.kb-path-foot { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--muted); }
.kb-resume { font-weight: 600; color: var(--brand); }
.kb-card { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); cursor: pointer; overflow: hidden; transition: box-shadow .15s ease; }
.kb-card:hover { box-shadow: var(--hairline), 0 6px 18px rgba(0,0,0,.08); }
.kb-thumb { height: 132px; border-radius: 3px 3px 0 0; position: relative; overflow: hidden; background: #f0efe9; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.kb-thumb.sm { height: 120px; }
.kb-thumb-ph { font-size: 34px; color: var(--faint); }
.kb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,40,28,.28); }
.kb-play > span { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--brand); }
.kb-dur { position: absolute; bottom: 8px; right: 8px; font-family: 'Space Mono', monospace; font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(0,0,0,.6); border-radius: 4px; padding: 2px 6px; }
.kb-cardbody { padding: 11px 13px 14px; }
.kb-typebadge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .3px; border-radius: 4px; padding: 3px 7px; }
.kb-typebadge.video { color: var(--orange); background: var(--orange-bg); }
.kb-typebadge.pdf { color: var(--brand); background: var(--brand-tint); }
.kb-typebadge.article { color: #16243A; background: #eef1f6; }
.kb-cardtitle { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 8px; line-height: 1.3; }
.kb-carddesc { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.kb-cardmeta { font-size: 11.5px; color: var(--label); margin-top: 8px; }
.kb-browse { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.kb-rail-h { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--label); padding: 0 10px 8px; }
.kb-rail-g { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 0 10px 5px; margin-top: 14px; }
.kb-rail-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--label); }
.kb-rail-item:hover { background: var(--surface); }
.kb-rail-item.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.kb-rail-item.active .ic { color: var(--brand); }
.kb-types { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.kb-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--control-border); background: #fff; color: #6b706a; border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.kb-chip.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.kb-count { font-size: 12px; color: var(--label); }
.kb-global { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--brand); background: var(--brand-badge); border-radius: 4px; padding: 3px 6px; margin-left: 6px; }
/* article body (block doc) rendering on the reader */
.kb-doc h2 { font-size: 20px; font-weight: 600; color: var(--ink); margin: 18px 0 10px; }
.kb-doc h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 16px 0 8px; }
.kb-doc p { font-size: 15px; line-height: 1.7; color: var(--body); margin: 0 0 14px; }
.kb-doc ul, .kb-doc ol { font-size: 15px; line-height: 1.8; color: var(--body); padding-left: 22px; margin: 0 0 14px; }
.kb-doc blockquote { border-left: 3px solid var(--brand); background: var(--surface); padding: 12px 16px; border-radius: 0 6px 6px 0; margin: 0 0 16px; font-size: 14px; color: var(--body); line-height: 1.6; }
.kb-doc pre { background: #1c1c1c; color: #e7e1d4; border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-family: 'Space Mono', monospace; font-size: 12.5px; margin: 0 0 16px; }
.kb-doc img { max-width: 100%; border-radius: 6px; margin: 0 0 6px; display: block; }
.kb-doc figcaption { font-size: 11.5px; color: var(--label); margin: 0 0 16px; }

/* ── Admin KB manager ──────────────────────────────────────────────────────── */
.ak-wrap { max-width: 1240px; margin: 0 auto; padding: 26px 28px 64px; }
.ak-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.ak-kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); padding: 15px 16px; display: flex; align-items: center; gap: 12px; }
.ak-kpi-ic { width: 38px; height: 38px; border-radius: 8px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; flex: none; color: var(--brand); }
.ak-kpi .n { font-family: 'Space Mono', monospace; font-size: 21px; font-weight: 700; color: var(--ink); }
.ak-kpi .k { font-size: 11px; color: var(--label); text-transform: uppercase; letter-spacing: .5px; }
.ak-grid { display: grid; grid-template-columns: 256px 1fr; gap: 22px; align-items: start; }
.ak-tree { position: sticky; top: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); padding: 12px 10px; }
.ak-tree-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 10px; }
.ak-tree-head .h { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--label); }
.ak-treerow { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--body); }
.ak-treerow:hover { background: var(--surface); }
.ak-treerow.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.ak-treerow.active .ic { color: var(--brand); }
.ak-list { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); overflow: hidden; }
.ak-list-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hair-2); }
.ak-irow { display: grid; grid-template-columns: 1fr 120px 90px 120px; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--hair-3); align-items: center; cursor: pointer; }
.ak-irow:hover { background: var(--surface); }
.ak-irow:last-child { border-bottom: 0; }
.ak-mini { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 11.5px; font-weight: 600; color: #6b706a; background: var(--surface); border: 1px solid var(--hair); border-radius: 6px; padding: 5px 9px; cursor: pointer; }
.ak-crumb { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ak-editor { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); padding: 22px; }
.ak-editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.ak-lbl { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--label); margin: 14px 0 7px; }
.ak-lbl:first-child { margin-top: 0; }
.ak-input, .ak-select, .ak-textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--control-border); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--ink); outline: 0; background: #fff; }
.ak-textarea { resize: vertical; line-height: 1.5; }
.ak-block { border: 1px solid var(--hair); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.ak-block-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.ak-block-bar select { font: inherit; font-size: 12px; border: 1px solid var(--control-border); border-radius: 6px; padding: 4px 7px; color: var(--body); background: #fff; }
.ak-block-x { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--label); display: flex; padding: 2px; }
.ak-rail { border-radius: var(--radius); }
.ak-rail-sect { border: 1px solid var(--hair); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.ak-rail-h { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--label); margin-bottom: 11px; }
.ak-toggle { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.ak-sw { width: 36px; height: 20px; border-radius: 999px; flex: none; background: #d8d6cd; position: relative; transition: background .15s; }
.ak-sw.on { background: var(--brand); }
.ak-sw > i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.ak-sw.on > i { left: 18px; }
.ak-soon { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--warn-ink); background: var(--warn-bg); border-radius: 4px; padding: 2px 6px; }
.kb-modal-back { position: fixed; inset: 0; background: rgba(20,28,22,.5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 30px; }
.kb-modal { width: 760px; max-width: 100%; max-height: 100%; background: #fff; border-radius: 4px; box-shadow: 0 18px 60px rgba(0,0,0,.3); overflow: hidden; display: flex; flex-direction: column; }
.kb-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--hair); }
.kb-modal-head .ic { color: var(--brand); }
.kb-modal-body { overflow-y: auto; }
.kb-video { height: 380px; background: #1c1c1c; position: relative; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.kb-video .kb-play-lg { position: relative; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--brand); }
.kb-video-scrim { position: absolute; inset: 0; background: rgba(0,40,28,.4); }
.kb-lms-strip { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--hair); background: var(--panel-2); flex-wrap: wrap; }
.kb-x { border: 0; background: none; cursor: pointer; color: var(--muted); display: flex; padding: 0; }
.kb-x:hover { background: none; color: var(--ink); }

/* ── Support / ticketing ───────────────────────────────────────────────────── */
.sp-wrap { max-width: 1100px; margin: 0 auto; padding: 26px 28px 64px; }
.sp-stats { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.sp-stat { flex: 1; min-width: 120px; background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); padding: 14px 16px; }
.sp-stat .n { font-family: 'Space Mono', monospace; font-size: 22px; font-weight: 700; }
.sp-stat .k { font-size: 11.5px; color: var(--label); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.sp-kbcta { flex: 2; min-width: 240px; background: var(--brand); border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; gap: 12px; cursor: pointer; color: #fff; }
.sp-kbcta .ic-wrap { width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.sp-kbcta .ic { color: rgba(255,255,255,.85); }
.sp-table { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); overflow: hidden; }
.sp-thead, .sp-trow { display: grid; grid-template-columns: 1fr 130px 120px 110px; gap: 12px; padding: 12px 18px; align-items: center; }
.sp-thead { border-bottom: 1px solid var(--hair-2); font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--label); }
.sp-trow { border-bottom: 1px solid var(--hair-3); cursor: pointer; }
.sp-trow:hover { background: var(--surface); }
.sp-ref { font-family: 'Space Mono', monospace; font-size: 11.5px; color: var(--label); }
.sp-subj { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-tag { font-size: 10.5px; color: #6b706a; background: #f0efe9; border-radius: 4px; padding: 2px 7px; }
.sp-chan { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.sp-chan .ic { color: var(--label); }
.sp-form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.sp-card { background: #fff; border-radius: var(--radius); box-shadow: var(--hairline); padding: 22px; }
.sp-lbl { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--label); margin-bottom: 7px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.sp-chip { font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--control-border); background: #fff; color: #6b706a; border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.sp-chip.active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.sp-input, .sp-textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--control-border); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 13.5px; color: var(--ink); outline: 0; }
.sp-textarea { resize: vertical; line-height: 1.5; }
.sp-suggest { position: sticky; top: 0; background: var(--brand-tint); border: 1px solid #d6e7de; border-radius: 10px; padding: 16px; }
.sp-suggest-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--brand); }
.sp-suggest-sub { margin: 0 0 12px; font-size: 11.5px; color: #4a6157; line-height: 1.45; }
.sp-suggest-list { display: flex; flex-direction: column; gap: 8px; }
.sp-suggest-card { display: flex; gap: 11px; align-items: center; padding: 10px 11px; border: 1px solid var(--control-border); border-radius: 8px; cursor: pointer; background: #fff; }
.sp-suggest-card:hover { border-color: #9fcab5; }
.sp-suggest-ic { width: 34px; height: 34px; border-radius: 7px; flex: none; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; color: var(--brand); }
.sp-thread { overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.sp-msg-row { display: flex; gap: 11px; }
.sp-msg-row.staff { flex-direction: row-reverse; }
.sp-msg-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; background: var(--cream); color: var(--brand); }
.sp-msg-row.staff .sp-msg-av { background: var(--brand); color: #fff; }
.sp-msg-bubble { max-width: 78%; }
.sp-msg-body { font-size: 13px; color: var(--ink); background: var(--surface); border-radius: 10px; padding: 11px 13px; line-height: 1.5; white-space: pre-wrap; }
.sp-msg-row.staff .sp-msg-body { background: var(--brand-tint); }
.sp-msg-meta { font-size: 11px; color: var(--label); margin-top: 4px; }
.sp-reply { border-top: 1px solid var(--hair); padding: 12px 16px; display: flex; gap: 10px; align-items: center; }
.sp-reply input { flex: 1; border: 1px solid var(--control-border); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 13px; outline: 0; }

/* ── Global Help (?) menu ──────────────────────────────────────────────────── */
.hm-pop { width: 320px; padding: 0; overflow: hidden; }
.hm-head { padding: 14px 16px; border-bottom: 1px solid var(--hair-2); }
.hm-head .t { font-size: 14px; font-weight: 600; color: var(--ink); }
.hm-head .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hm-actions { padding: 8px; }
.hm-item { display: flex; gap: 11px; align-items: center; padding: 10px 11px; border-radius: 8px; cursor: pointer; }
.hm-item:hover { background: var(--surface); }
.hm-item-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; flex: none; color: var(--brand); }
.hm-item .tt { font-size: 13px; font-weight: 600; color: var(--ink); }
.hm-item .ss { font-size: 11px; color: var(--label); line-height: 1.35; }
.hm-foot { display: flex; gap: 14px; padding: 10px 12px 12px; border-top: 1px solid var(--hair-3); margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.hm-foot span { display: inline-flex; align-items: center; gap: 6px; }
.hm-chat { display: flex; flex-direction: column; height: 380px; }
.hm-chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--hair-2); }
.hm-chat-av { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.hm-chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel-2); }
.hm-bubble { align-self: flex-start; max-width: 88%; font-size: 12.5px; color: var(--ink); background: #fff; border: 1px solid var(--hair); border-radius: 10px; padding: 9px 11px; line-height: 1.5; }
.hm-bubble.me { align-self: flex-end; background: var(--brand-tint); border-color: #d6e7de; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-chip { font-size: 11.5px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border: 1px solid #d6e7de; border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.hm-scard { display: flex; gap: 9px; align-items: center; background: #fff; border: 1px solid var(--hair); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.hm-scard .ic { color: var(--brand); }
.hm-escalate { display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border: 1px solid #d6e7de; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.hm-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--hair-2); }
.hm-input input { flex: 1; border: 1px solid var(--control-border); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 12.5px; outline: 0; }
.hm-send { border: 0; background: var(--brand); border-radius: 8px; width: 38px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; padding: 0; }
.hm-back-btn { border: 0; background: none; cursor: pointer; display: flex; padding: 0; color: var(--muted); }

/* ── Admin Support desk (queue · conversation · member context) ─────────────── */
.ds { height: 100%; display: grid; grid-template-columns: 330px 1fr 312px; background: var(--canvas); overflow: hidden; }
@media (max-width: 1100px) { .ds { grid-template-columns: 300px 1fr; } .ds-ctx { display: none; } }
.ds-unauth { padding: 56px 20px; text-align: center; color: var(--muted); }
.ds-queue { border-right: 1px solid var(--hair); background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.ds-queue-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--hair-2); }
.ds-queue-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ds-queue-title h1 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.ds-open-count { font-size: 11.5px; font-weight: 600; color: var(--brand); background: var(--brand-badge); border-radius: 999px; padding: 3px 9px; }
.ds-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ds-fchip { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 11.5px; font-weight: 600; border: 1px solid var(--control-border); background: #fff; color: #6b706a; border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.ds-fchip.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.ds-list { overflow-y: auto; flex: 1; }
.ds-row { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--hair-3); cursor: pointer; border-left: 3px solid transparent; }
.ds-row:hover { background: var(--surface); }
.ds-row.active { background: var(--brand-tint); border-left-color: var(--brand); }
.ds-av { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--cream); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.ds-row-subj { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ds-row-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 10.5px; color: var(--label); }
.ds-prio { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex: none; }
.ds-conv { display: flex; flex-direction: column; overflow: hidden; background: var(--canvas); }
.ds-conv-head { background: #fff; border-bottom: 1px solid var(--hair); padding: 14px 22px; }
.ds-conv-row { display: flex; align-items: center; gap: 10px; }
.ds-conv-title { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ds-conv-title h2 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; color: var(--ink); }
.ds-related { display: flex; align-items: center; gap: 10px; margin-top: 11px; background: var(--surface); border: 1px solid var(--control-border); border-radius: 8px; padding: 9px 12px; }
.ds-thread { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.ds-banner { display: flex; align-items: center; gap: 9px; align-self: center; font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--hair); border-radius: 999px; padding: 5px 13px; }
.ds-msg { display: flex; gap: 11px; }
.ds-msg.staff { flex-direction: row-reverse; }
.ds-msg-bubble { max-width: 76%; }
.ds-msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 10.5px; color: var(--label); }
.ds-msg.staff .ds-msg-head { flex-direction: row-reverse; }
.ds-msg-body { font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--hair); border-radius: 10px; padding: 12px 14px; line-height: 1.55; white-space: pre-wrap; }
.ds-msg.staff .ds-msg-body { background: var(--brand-tint); border: 0; }
.ds-composer { background: #fff; border-top: 1px solid var(--hair); padding: 12px 18px 16px; }
.ds-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.ds-tab { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); padding: 6px 11px; cursor: pointer; }
.ds-tab.active { border-bottom-color: var(--brand); color: var(--brand); }
.ds-reply-box { border: 1px solid var(--control-border); border-radius: 10px; overflow: hidden; }
.ds-reply-box textarea { width: 100%; box-sizing: border-box; border: 0; outline: 0; resize: vertical; font: inherit; font-size: 13.5px; color: var(--ink); padding: 12px; line-height: 1.55; }
.ds-reply-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--hair-2); background: var(--panel-2); }
.ds-sig { margin: 0 12px 12px; padding-top: 12px; border-top: 1px solid var(--hair-2); display: flex; align-items: center; gap: 11px; }
.ds-kbpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-kbcard { display: flex; gap: 9px; align-items: center; border: 1px solid var(--control-border); border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.ds-kbcard:hover { border-color: #9fcab5; }
.ds-kbic { width: 30px; height: 30px; border-radius: 6px; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; flex: none; color: var(--brand); }
.ds-ctx { border-left: 1px solid var(--hair); background: #fff; overflow-y: auto; }
.ds-ctx-head { padding: 20px 18px; border-bottom: 1px solid var(--hair-2); text-align: center; }
.ds-ctx-av { width: 56px; height: 56px; border-radius: 50%; background: var(--cream); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 19px; }
.ds-sect { padding: 16px 18px; border-bottom: 1px solid var(--hair-2); }
.ds-sect-h { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--label); margin-bottom: 11px; }
.ds-ctx-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.ds-ctx-k { font-size: 12px; color: var(--muted); }
.ds-ctx-v { font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 600; color: var(--ink); text-align: right; }
.ds-ghost { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; font-weight: 600; color: var(--brand); background: #fff; border: 1px solid #d7ddd9; border-radius: 7px; padding: 7px 11px; cursor: pointer; }
.ds-recent { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }

/* ── Admin Support settings (admin-settings.js) — email setup + signature ─────── */
.st-wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.st-head h1 { margin: 0; font-size: 22px; color: var(--ink); }
.st-head p { margin: 4px 0 0; font-size: 14px; }
.st-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--hairline); padding: 20px; }
.st-card-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.st-card-head h2 { margin: 0; font-size: 16px; color: var(--ink); }
.st-card-head p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; }
.st-ic { flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.st-field { margin-bottom: 14px; }
.st-field > label { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.st-field input, .st-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; color: var(--ink); background: #fff; border: 1px solid var(--control-border); border-radius: var(--radius-ctrl); padding: 9px 11px; }
.st-field input:focus, .st-field textarea:focus { outline: none; border-color: var(--brand); }
.st-field textarea { resize: vertical; line-height: 1.5; }
.st-hint { margin-top: 5px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.st-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.st-status { background: var(--hair-3); border-radius: 9px; padding: 12px 14px; margin: 4px 0 16px; display: flex; flex-direction: column; gap: 7px; }
.st-status-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--body); }
.st-status-row .ic { color: var(--brand); flex: none; }
.st-note { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.45; border-radius: 9px; padding: 11px 13px; margin-bottom: 14px; }
.st-note .ic { flex: none; margin-top: 1px; }
.st-note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.st-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.st-ghost { background: transparent; color: var(--body); border: 1px solid var(--control-border); }
.st-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--muted); }
@media (max-width: 640px) { .st-grid2 { grid-template-columns: 1fr; } }

/* ── LMS video (Cloudflare Stream) — reader player + admin uploader ──────────── */
.kb-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 0; overflow: hidden; }
.kb-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Imported-SCORM runtime: a tall same-origin iframe hosting the package's launch file. */
.kb-scorm-frame { width: 100%; height: 72vh; background: #fff; overflow: hidden; }
.kb-scorm-iframe { width: 100%; height: 100%; border: 0; display: block; }
.ak-video-up { background: var(--hair-3); border: 1px solid var(--hair); border-radius: 9px; padding: 12px; margin-bottom: 10px; }
.ak-video-state { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.ak-video-state .ic { color: var(--brand); }
.ak-bar { height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; margin-bottom: 9px; }
.ak-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }
.ak-mini.disabled { opacity: .55; pointer-events: none; }
.ak-hint { margin-top: 7px; font-size: 11px; color: var(--label); line-height: 1.45; }

/* ── LMS quizzes + watch-verification (reader) ──────────────────────────────── */
.kb-quiz { margin: 0 30px 18px; padding: 16px 18px; background: var(--hair-3); border-radius: 12px; }
.kb-quiz-h { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.kb-q { margin-bottom: 14px; }
.kb-q-prompt { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.kb-q-choice { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--control-border); border-radius: 8px; margin-bottom: 6px; font-size: 13px; color: var(--body); cursor: pointer; background: #fff; }
.kb-q-choice.on { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.kb-quiz-result { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; background: var(--warn-bg); color: var(--warn-ink); }
.kb-quiz-result.pass { background: var(--ok-bg); color: var(--ok); }
.kb-watch-modal { position: absolute; inset: 0; background: rgba(20,28,22,.62); display: flex; align-items: center; justify-content: center; z-index: 5; border-radius: inherit; }
.kb-watch-card { background: var(--panel); border-radius: 14px; padding: 26px 30px; text-align: center; max-width: 320px; box-shadow: 0 18px 48px rgba(0,0,0,.3); }
.kb-watch-card .ic { color: var(--brand); width: 30px; height: 30px; }

/* ── LMS authoring (admin) — quiz editor + path manager ─────────────────────── */
.ak-quiz { margin-top: 18px; padding: 15px; border: 1px dashed var(--control-border); border-radius: 11px; background: var(--hair-3); }
.ak-quiz-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.ak-q { padding: 10px; background: #fff; border: 1px solid var(--hair); border-radius: 9px; margin-bottom: 9px; }
.ak-iconbtn { width: 30px; height: 30px; padding: 0; flex: none; justify-content: center; background: #fff; color: var(--muted); border: 1px solid var(--control-border); border-radius: 7px; }
.ak-iconbtn:hover { color: var(--ink); border-color: var(--muted); }
.ak-paths { background: var(--panel); border-radius: var(--radius); box-shadow: var(--hairline); padding: 16px 18px; margin-bottom: 16px; }
.ak-paths-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ak-paths-head .h { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ak-path-edit { background: var(--hair-3); border-radius: 10px; padding: 13px; margin-bottom: 12px; }
.ak-path-items { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 6px 0 8px; }
.ak-path-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--control-border); border-radius: 7px; font-size: 12.5px; color: var(--body); cursor: pointer; background: #fff; }
.ak-path-item.on { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.ak-path-list { display: flex; flex-direction: column; gap: 7px; }
.ak-path-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--hair); border-radius: 9px; }
.ak-path-row .ic { color: var(--brand); }

/* ── Platform console (admin.recursivemls.com — tenant provisioning) ───────────── */
.btn.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn.danger { background: var(--brand); border-color: var(--brand); }
.btn.danger:hover { background: #b3261e; border-color: #b3261e; }
.admin-platform { max-width: 1000px; margin: 0 auto; }
.ap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ap-head h1 { margin: 0 0 2px; }
.ap-head p { margin: 0; }
.ap-pad { padding: 18px 2px; }
.ap-warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 9px; padding: 10px 13px; margin-bottom: 14px; font-size: 13px; }
.ap-create, .ap-edit { margin-bottom: 18px; }
.ap-create h3, .ap-edit h3 { margin: 0 0 12px; }
.ap-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ap-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ap-form input, .ap-form select { font: inherit; padding: 9px 11px; border: 1px solid #d9d7cd; border-radius: var(--radius-ctrl); background: var(--panel); color: var(--ink); }
.ap-host { display: flex; align-items: center; gap: 6px; }
.ap-host input { flex: 1; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.ap-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); box-shadow: var(--hairline); overflow: hidden; }
.ap-table th, .ap-table td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.ap-table th { font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.ap-table tr.is-selected { background: var(--warn-bg); }
.ap-table tr:last-child td { border-bottom: none; }
.ap-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.ap-row-actions { text-align: right; }
.ap-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ap-edit h4 { margin: 16px 0 9px; }
.ap-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.ap-feature { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.ap-feature input { width: 15px; height: 15px; }
.ap-integ { margin-top: 18px; border-top: 1px solid var(--hair); padding-top: 14px; }
.ap-integ h4 { margin: 0 0 12px; }
.ap-int-block { border: 1px solid var(--hair); border-radius: 10px; padding: 13px; margin-bottom: 12px; }
.ap-int-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.ap-int-block .ap-actions { margin-top: 11px; }
