/**
 * Consumer app — the thin web front end (Product UI design). Mobile-first:
 * a full-height app frame; on wide screens it centres like the prototype's
 * phone frame with the live checklist beside the chat.
 */
.tkc-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: var(--tk-space-6);
  padding: 0;
}
@media (min-width: 900px) {
  .tkc-shell { padding: var(--tk-space-6); align-items: flex-start; }
}

.tkc-app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--tk-surface);
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 900px) {
  .tkc-app {
    min-height: 0;
    height: min(860px, calc(100dvh - 48px));
    border: 10px solid var(--tk-slate);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--tk-shadow-2);
  }
}

/* header — logo right (RTL start), human escape hatch end */
.tkc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--tk-space-3) var(--tk-space-4);
  background: var(--tk-surface-raised);
  border-block-end: 1px solid var(--tk-line);
  gap: var(--tk-space-3);
  flex: none;
}
/* Header cut per the Product UI canvas: 18px solid-stone arch, Heebo 400. */
.tkc-header .tk-wordmark { font-size: 15.5px; font-weight: 400; letter-spacing: .09em; text-indent: .09em; }
.tkc-human-link { color: var(--tk-teal); font-weight: 600; font-size: 14px; border: 0; background: none; cursor: pointer; }

/* the live-filling checklist — "מה כבר ידוע עליך" */
.tkc-known {
  border-block-end: 1px solid var(--tk-line);
  background: var(--tk-surface-raised);
  padding: var(--tk-space-2) var(--tk-space-4) var(--tk-space-3);
  flex: none;
}
.tkc-known-title { font-size: 13px; font-weight: 700; }
.tkc-known-progress { font-size: 12px; color: var(--tk-slate-muted); }
.tkc-known-head { display: flex; justify-content: space-between; align-items: baseline; margin-block-end: 8px; }
.tkc-known-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tkc-slot-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--tk-radius-pill); padding: 3px 12px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--tk-line); color: var(--tk-slate-muted); background: var(--tk-surface);
}
.tkc-slot-chip[data-state="filled"] { background: var(--tk-slate); color: var(--tk-surface); border-color: var(--tk-slate); }
.tkc-slot-chip[data-state="active"] { border-color: var(--tk-amber-fill); color: var(--tk-slate); box-shadow: inset 0 -2px 0 var(--tk-amber-fill); }
.tkc-progress-track { height: 3px; background: var(--tk-surface-alt); border-radius: 2px; margin-block-start: 10px; overflow: hidden; display: flex; justify-content: flex-start; }
.tkc-progress-fill { height: 3px; background: var(--tk-amber-fill); border-radius: 2px; transition: width .4s ease; }

/* chat log */
.tkc-log {
  flex: 1; overflow-y: auto;
  padding: var(--tk-space-4);
  display: flex; flex-direction: column; gap: var(--tk-space-3);
  scroll-behavior: smooth;
}
.tkc-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.55; overflow-wrap: break-word; }
.tkc-msg-assistant { align-self: flex-start; background: var(--tk-surface-raised); border: 1px solid var(--tk-line); border-start-start-radius: 4px; }
.tkc-msg-user { align-self: flex-end; background: var(--tk-slate); color: var(--tk-surface); border-start-end-radius: 4px; }
.tkc-msg-agent { align-self: flex-start; background: rgba(51,105,104,.10); border: 1px solid var(--tk-teal); border-start-start-radius: 4px; }
.tkc-disclosure {
  background: var(--tk-surface-alt); color: var(--tk-slate-muted);
  border-radius: var(--tk-radius-input); padding: 10px 14px;
  font-size: 13px; line-height: 20px;
}
.tkc-msg b, .tkc-msg strong { font-weight: 700; }

/* quick replies */
.tkc-quick { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.tkc-quick .tk-chip { min-height: var(--tk-touch-min); }

/* match card inside chat */
.tkc-match-card { align-self: stretch; max-width: 100%; padding: var(--tk-space-4); }
.tkc-match-head { display: flex; justify-content: space-between; gap: var(--tk-space-3); align-items: start; }
.tkc-match-title { font-size: 17px; font-weight: 700; }
.tkc-match-sub { font-size: 13px; color: var(--tk-slate-muted); margin-block-start: 2px; }
.tkc-match-rule { height: 2px; background: var(--tk-amber-fill); border-radius: 2px; margin: 10px 0 4px; }
.tkc-stale { color: var(--tk-clay); font-size: 12px; }

/* comparables (seller flow) */
.tkc-comparables { align-self: stretch; }
.tkc-comparable { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--tk-line); font-size: 14px; }
.tkc-comparable:last-child { border-block-end: 0; }

/* composer */
.tkc-composer {
  flex: none; display: flex; gap: var(--tk-space-2);
  padding: var(--tk-space-3) var(--tk-space-4) calc(var(--tk-space-3) + env(safe-area-inset-bottom));
  background: var(--tk-surface); border-block-start: 1px solid var(--tk-line);
}
.tkc-composer input {
  flex: 1; min-height: var(--tk-control-h);
  border: 1px solid var(--tk-line); border-radius: var(--tk-radius-pill);
  background: var(--tk-surface-raised); font: inherit; font-size: 15px;
  padding: 0 var(--tk-space-4); color: var(--tk-slate);
}
.tkc-composer input:focus { outline: 2px solid var(--tk-teal); }
.tkc-send {
  min-width: var(--tk-control-h); min-height: var(--tk-control-h);
  border-radius: 50%; border: 0; background: var(--tk-slate); color: var(--tk-surface);
  font-size: 18px; cursor: pointer; display: grid; place-items: center;
}
.tkc-send svg { transform: scaleX(-1); }

/* side panel (desktop): screens nav like the prototype */
.tkc-side { display: none; }
@media (min-width: 900px) {
  .tkc-side { display: block; width: 290px; padding-block-start: var(--tk-space-2); }
  .tkc-side .tk-card { padding: 14px 16px; margin-block-end: 10px; display: block; color: inherit; border-bottom: 1px solid var(--tk-line); }
  .tkc-side a.tk-card:hover { border-color: var(--tk-slate-muted); }
}

/* standalone pages (matches list, detail, calculator, privacy, handoff) */
.tkc-page { max-width: 560px; margin: 0 auto; padding: var(--tk-space-5) var(--tk-space-4) var(--tk-space-8); }
.tkc-page-header { display: flex; align-items: center; justify-content: space-between; margin-block-end: var(--tk-space-5); }
.tkc-list-row { padding: var(--tk-space-4); margin-block-end: var(--tk-space-3); display: block; color: inherit; }
.tkc-hero-img {
  background: repeating-linear-gradient(45deg, var(--tk-surface-alt), var(--tk-surface-alt) 12px, #E5DFD5 12px, #E5DFD5 24px);
  border-radius: var(--tk-radius-card); min-height: 180px; position: relative;
}
.tkc-hero-stamp {
  position: absolute; inset-inline-end: 10px; inset-block-end: 10px;
  background: var(--tk-slate); color: var(--tk-surface);
  font-size: 11px; padding: 2px 8px; border-radius: 3px;
}

/* true-cost table */
.tkc-cost-row { display: flex; justify-content: space-between; padding: 10px 0; border-block-end: 1px solid var(--tk-line); font-size: 15px; }
.tkc-cost-row:last-child { border-block-end: 0; }
.tkc-cost-row [data-tnum] { font-weight: 700; }
.tkc-cost-row.is-linkage [data-tnum] { color: var(--tk-clay); }
.tkc-cost-row.is-total { font-size: 17px; }
.tkc-cost-row.is-total [data-tnum] { font-size: 20px; }

/* toggles (privacy centre) */
.tkc-toggle-card { display: flex; align-items: center; justify-content: space-between; gap: var(--tk-space-3); padding: var(--tk-space-4); margin-block-end: var(--tk-space-3); }
.tkc-switch { position: relative; width: 52px; height: 30px; flex: none; }
.tkc-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tkc-switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--tk-surface-alt); border: 1px solid var(--tk-line); transition: background .15s; }
.tkc-switch-knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--tk-surface-raised); box-shadow: var(--tk-shadow-1); transition: transform .15s; }
.tkc-switch input:checked ~ .tkc-switch-track { background: var(--tk-sage); border-color: var(--tk-sage); }
.tkc-switch input:checked ~ .tkc-switch-knob { transform: translateX(-22px); }

/* SLA countdown (handoff / trust contract) */
.tkc-sla { text-align: center; padding: var(--tk-space-4); background: var(--tk-surface-alt); border-radius: var(--tk-radius-input); }
.tkc-sla-clock { font-size: 30px; font-weight: 700; color: var(--tk-teal); font-variant-numeric: tabular-nums; direction: ltr; }
.tkc-sla-track { height: 4px; background: var(--tk-line); border-radius: 2px; margin: 10px 0; overflow: hidden; display: flex; justify-content: flex-start; }
.tkc-sla-fill { height: 4px; background: var(--tk-teal); }
