/* Zerem v4 — the app (read-only phase). Sits on v4.css (tokens, base, the
 * one primary button). Four destinations, one primary action per screen:
 * home's is "new job", a job's is the one jobView() derives from its state.
 * Everything else is quiet (outline or text). */

body.app { min-height: 100dvh; }

/* ---------- shell ---------- */
/* Sizes from the approved pictures (general/zerem-options/build.mjs, 6.10):
   "כל מה שראיתי בתמונות, שככה יראה בדיוק". */
.app-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  height: 76px; padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.app-top .brand { margin-inline-end: auto; min-height: 44px; gap: 12px; }
.app-top .mark { width: 40px; height: 40px; border-radius: 11px; }
.app-top .mark svg { width: 22px; height: 22px; }
.app-top .wordmark { font-size: 26px; letter-spacing: -.3px; }
/* "by SJ" after the wordmark (Stav's pick i1, 6.10, lowercase: "אבל by לא BY"). */
.by-sj {
  margin-inline-start: 8px; margin-top: 6px; align-self: center; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--ink-3);
}
.beta-tag {
  font-size: 14px; line-height: 1.3; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: var(--r-full); padding: 4px 14px;
}
.back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-inline-start: -10px;
  border: 0; border-radius: var(--r-full); background: transparent; color: var(--ink);
}
.back:hover { background: var(--sunken); }
.back svg { width: 22px; height: 22px; }

.app-main { flex: 1; padding: 18px 0 calc(104px + env(safe-area-inset-bottom)); }
/* Whatever is scrolled to (focus, a field the browser flags, a tap's target)
   stops above the bottom tabs, not under them (21.10: "שמור" of פרטי העסק sat
   under "פרויקטים" in a 611px-high window). */
html { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { html { scroll-padding-bottom: 0; } }
.app-col { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* bottom tabs on a phone, a rail on the start side on a wide screen */
.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
  /* Four tabs, or five for the admin (his project board): as many columns as tabs. */
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  min-height: calc(84px + env(safe-area-inset-bottom));
  padding: 11px 8px env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  min-height: 52px; border-radius: var(--r-s);
  color: var(--ink-3); text-decoration: none; font-size: 13px; font-weight: 400; line-height: 1.3;
}
.tab svg { width: 26px; height: 26px; }
/* The blue count on "פרויקטים": what is on him today on his board (6.10). */
.tab-ico { position: relative; display: block; width: 26px; height: 26px; }
.tab-badge {
  position: absolute; top: -6px; left: -9px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  display: grid; place-items: center;
  background: #4d9bff; color: #0E1013; font-size: 11px; font-weight: 700; line-height: 1;
}
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg { stroke-width: 2.2; }
@media (min-width: 1024px) {
  body.app { padding-inline-start: 220px; }
  .tabs {
    inset-inline: auto; inset-inline-start: 0; top: 0; bottom: 0; width: 220px;
    display: flex; flex-direction: column; gap: 4px;
    padding: 76px 12px 16px;
    border-top: 0; border-inline-end: 1px solid var(--line);
    background: var(--bg);
  }
  .tabs { min-height: 0; }
  .tab { flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px; padding: 0 14px; font-size: 15px; font-weight: 500; }
  .tab svg { width: 22px; height: 22px; }
  .tab-ico { width: 22px; height: 22px; }
  .tab[aria-current="page"] { background: var(--sunken); }
  .app-top { padding-inline-start: 16px; }
  .app-main { padding-bottom: 48px; }
}

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.page-sub { margin-top: 4px; font-size: 16px; color: var(--ink-3); }
/* The home's headline, as on his board: "היום <em>2 דברים</em> עליך" (Stav, 6.10). */
.hello { margin-bottom: 16px; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.hello em { font-style: normal; color: var(--brand); }

.beta-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin-bottom: 20px; padding: 12px 14px;
  border-radius: var(--r-m); background: var(--sunken);
  font-size: 14px; color: var(--ink-2);
}
.beta-note a { color: var(--ink); font-weight: 600; padding-block: 11px; margin-block: -11px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: block; width: 100%; text-align: start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-1);
  color: inherit; text-decoration: none;
  line-height: 1.3;
  transition: border-color var(--t) var(--ease);
}
.card:hover { border-color: var(--line-2); }
.card-row { display: flex; align-items: baseline; gap: 12px; }
.card-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
/* A thumb-sized target without a taller row: the padding grows the link, the
 * negative margin gives the space back. */
a.card-title { color: inherit; text-decoration: none; padding-block: 11.5px; margin-block: -11.5px; }
a.card-title:hover { text-decoration: underline; }
.home-primary { margin: 4px 0 6px; }
.home-primary .btn-primary { width: 100%; }
@media (min-width: 720px) { .home-primary .btn-primary { width: auto; min-width: 220px; } }
.card-amount { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-meta { margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.card-reason { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.card-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions .btn-outline { min-height: 38px; padding: 0 16px; font-size: 15px; }
/* 44px for the finger, the same pixels for the eye (the design session, 9.10):
 * a smaller control keeps its look, and an invisible layer around it takes the
 * tap, up to 44px tall, and never past the midpoint to a neighbour.
 * scripts/measure.mjs --v4 checks it by hit-testing, not by the box. */
.card-actions .btn-outline, .ibtn, .sug-chip, .logo-row .logo-btn, .logo-row .bg-clear, .seg3 button { position: relative; }
/* The layer sits on the padding box, inside the border: a 38px button with a
 * 1px border needs 4px each way, not 3. */
.card-actions .btn-outline::before, .logo-row .logo-btn::before, .logo-row .bg-clear::before { content: ''; position: absolute; inset: -4px 0; }
.ibtn::before { content: ''; position: absolute; inset: -5px; }
.sug-chip::before { content: ''; position: absolute; inset: -5px 0; }
.seg3 button::before { content: ''; position: absolute; inset: -2px 0; }

.section-title { margin: 22px 2px 10px; font-size: 14px; font-weight: 600; color: var(--ink-3); }

.empty {
  padding: 28px 16px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-m);
  color: var(--ink-2); font-size: 15px;
}
.empty p + p { margin-top: 6px; color: var(--ink-3); font-size: 14px; }

/* secondary (outline) button: never filled */
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px;
  border: 1px solid var(--line-2); border-radius: var(--r-full);
  background: transparent; color: var(--ink);
  font-size: 17px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background var(--t) var(--ease);
}
.btn-outline:hover { background: var(--sunken); }

/* ---------- filters and search ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--sunken); border-radius: var(--r-full);
}
.seg button {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-full);
  background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.search {
  flex: 1; min-width: 180px; min-height: 56px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface); font-size: 18px;
}

/* ---------- clients: the list's swipe, the client's card (6.10) ---------- */
/* The approved pictures 2-delete-bottom and 3-delete-swipe. */
.cl-list { gap: 12px; }
.cl-slot { position: relative; }
.cl-card {
  position: relative; z-index: 1;
  min-height: 96px; padding: 18px 22px; border-radius: 20px;
  touch-action: pan-y;
  transition: transform .2s var(--ease), border-color var(--t) var(--ease);
}
.cl-card .card-title { font-size: 20px; }
.cl-card .card-meta { margin-top: 6px; font-size: 16px; }
.cl-slot.is-dragging .cl-card { transition: none; }
.cl-slot.is-open .cl-card { transform: translateX(104px); }
.cl-del {
  position: absolute; top: 0; bottom: 0; left: 0; width: 94px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; border-radius: 20px; background: #D9534F; color: #FFFFFF;
  font-size: 15px; font-weight: 600;
}
.cl-del svg { width: 24px; height: 24px; }
/* Only drawn while a card moves or stays open: no red edge behind the corners. */
.cl-slot:not(.is-open):not(.is-dragging) .cl-del { visibility: hidden; }
.swipe-hint { margin-top: 6px; text-align: center; font-size: 14px; color: var(--ink-3); }
.client-card { border-radius: 20px; }
.client-card .qe-form { border-top: 0; padding: 16px 18px 18px; gap: 12px; }
.qe-actions { display: flex; gap: 10px; margin-top: 4px; }
.danger-row {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 54px; margin-top: 14px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--danger);
  font-size: 17px; font-weight: 500;
}
.danger-row:hover { border-color: var(--line-2); }

/* ---------- the client's bank details (Stav's picks b2 + b3, 6.10, 4-bank) ---------- */
.bank { display: grid; gap: 12px; }
.bank-head {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 17px; font-weight: 600; color: var(--ink);
}
.bank-head svg { width: 20px; height: 20px; color: var(--ink-3); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); }
.kv b { font-size: 17px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; text-align: end; }
.bank-actions { margin-top: -2px; flex-wrap: wrap; }
.bank-actions svg { width: 20px; height: 20px; }
.bank-select {
  min-height: 50px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 15px;
  background: var(--bg); color: var(--ink); font-size: 17px;
}
.qe-save-row { padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- "עזור לנו להשתפר": two ways to help (Stav's pick j3, 6.10) ---------- */
.ways { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.way {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--ink); text-align: start;
}
.way.is-on { border-color: var(--brand); background: var(--brand-tint); }
.way-icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 14px; background: var(--sunken); color: var(--ink-2);
}
.way.is-on .way-icon { background: var(--brand); color: #0E1013; }
.way-icon svg { width: 22px; height: 22px; }
.way-text { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.way-text b { font-size: 17px; font-weight: 700; }
.way-text span { font-size: 14px; color: var(--ink-3); }
.way > svg { flex: none; width: 22px; height: 22px; color: var(--ink-3); }
.help-card { margin-top: 14px; display: grid; gap: 12px; padding: 16px 18px 18px; border-radius: 20px; }
.help-card .btn-primary { width: 100%; margin-top: 4px; }

/* ---------- "סוג העסק": a field that opens a list (Stav's pick d2, 6.10) ---------- */
.biz-kind { position: relative; }
.pick {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 50px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 15px;
  background: var(--bg); color: var(--ink); font-size: 17px; text-align: start;
}
.pick svg { width: 20px; height: 20px; color: var(--ink-3); transition: transform var(--t) var(--ease); }
.pick[aria-expanded="true"] svg { transform: rotate(180deg); }
.pick-list {
  display: grid; gap: 2px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: 15px; background: var(--me);
}
.pick-list[hidden] { display: none; }
.pick-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; padding: 0 14px;
  border: 0; border-radius: 11px; background: transparent;
  color: var(--ink-2); font-size: 17px; text-align: start;
}
.pick-opt svg { width: 20px; height: 20px; color: var(--brand-ink); visibility: hidden; }
.pick-opt[aria-selected="true"] { background: var(--line-2); color: var(--ink); font-weight: 600; }
.pick-opt[aria-selected="true"] svg { visibility: visible; }
.biz-note { margin-top: -2px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.search:focus { border-color: var(--line-2); }
.search:focus-visible, .qe-field input:focus-visible, .te-num input:focus-visible, .te-add input:focus-visible, .te-lname:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}

/* ---------- one job ---------- */
.job-client { margin-top: 4px; font-size: 16px; color: var(--ink-2); }
.status-chip {
  display: inline-block; margin-top: 10px;
  padding: 3px 10px; border-radius: var(--r-full);
  background: var(--sunken); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.job-amount {
  margin-top: 18px;
  font-size: clamp(30px, 6vw, 38px); font-weight: 700; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.job-amount small { display: block; font-size: 14px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }

/* The job's six stages in the board's circles (board-view.css .bv-dot): 21px,
 * a 2px border; done filled with a ✓, the current one the blue ring with its
 * halo (a deeper blue on light, as the board takes it there). Not buttons. */
.steps-line { display: flex; align-items: center; gap: 5px; margin: 22px 0 6px; }
.steps-line .st {
  box-sizing: border-box; width: 21px; height: 21px; flex: none;
  display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-2);
  color: transparent; font-size: 12px; font-weight: 700; line-height: 1;
}
.steps-line .st.done { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
/* Where a lost quote stopped: the plain ring, no fill, a muted ✕ (Stav, 10.10). */
.steps-line .st.stop { color: var(--ink-3); }
.steps-line .st.now { border-color: #5AA9FF; box-shadow: 0 0 0 3px rgba(90, 169, 255, 0.18); }
:root[data-theme="light"] .steps-line .st.now { border-color: #1F6FD1; box-shadow: 0 0 0 3px rgba(31, 111, 209, 0.18); }
.steps-caption { font-size: 13px; color: var(--ink-3); }
/* "ההצעה נפתחה" (Stav's pick o3, 6.10): נשלחה — נפתחה ×N — אישור, on the home
   card and the job screen alike. */
.steps-op { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: 13px; color: var(--ink-3); }
.steps-op .s { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.steps-op .d {
  width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1.5px solid var(--line-2); font-size: 11px; color: transparent;
}
.steps-op .s.on { color: var(--ink); }
.steps-op .s.on .d { background: var(--brand); border-color: var(--brand); color: #0E1013; font-weight: 700; }
.steps-op .ln { flex: 1; height: 2px; min-width: 14px; background: var(--line-2); border-radius: 2px; }
.steps-op .ln.on { background: var(--brand); }
.steps-when { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
/* "הלקוח אישר" is the ✓ in this row while the job waits for an answer (Stav's
 * picture b1-icons, 9.10): a green ring, the hint under it toward its end, and
 * a 44px tap around the step. */
.steps-op button.s { position: relative; margin: 0; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.steps-op button.s::before { content: ''; position: absolute; inset: -13px -8px; }
.steps-op .s.tap { color: var(--brand); font-weight: 600; }
:root[data-theme="light"] .steps-op .s.tap { color: var(--brand-ink); }
.steps-op .s.tap .d { background: transparent; border: 2px solid var(--brand); color: var(--brand); font-weight: 700; }
.tap-hint { color: var(--ink-3); font-size: 14px; margin: 6px 0 0; text-align: left; }

.job-primary { margin-top: 22px; }
[data-opened]:has(.tap-hint) ~ [data-job-actions] .job-primary { margin-top: 16px; }
.job-primary .btn-primary { width: 100%; }
@media (min-width: 720px) { .job-primary .btn-primary { width: auto; min-width: 240px; } }
.job-primary .hint { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.job-secondary { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
/* The file, the link and the copy: three equal tiles (b1-icons). */
.icon-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 10px;
  border: 1px solid var(--line-2); border-radius: 18px; background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.icon-btn:hover { background: var(--sunken); }
.icon-btn svg { width: 30px; height: 30px; }
/* "הלקוח לא אישר": quiet and grey, centred under the tiles; 44px to tap. */
.lost-link {
  display: block; width: fit-content; margin: 10px auto 0; padding: 12px 16px;
  border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 15px; cursor: pointer;
}

details.more {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}
details.more summary {
  min-height: 52px; display: flex; align-items: center;
  font-size: 15px; font-weight: 600; cursor: pointer; list-style: none;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: '+'; margin-inline-start: auto; color: var(--ink-3); font-weight: 400; font-size: 20px; }
details.more[open] summary::after { content: '−'; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.items li span:first-child { flex: 1; }
.items li span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.facts { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }

/* ---------- more ---------- */
.menu { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.menu a, .menu button {
  display: flex; align-items: center; min-height: 52px; padding: 0 16px;
  border: 0; background: transparent; text-align: start; text-decoration: none; font-size: 15px; color: var(--ink);
}
.menu > * + * { border-top: 1px solid var(--line); }
.menu a:hover, .menu button:hover { background: var(--sunken); }
/* "מצב בהיר": a row with a switch at its end; on = light. */
.menu .theme-row { justify-content: space-between; gap: 12px; width: 100%; cursor: pointer; font: inherit; font-size: 15px; }
.theme-row .knob { position: relative; flex: none; width: 44px; height: 26px; border-radius: var(--r-full); background: var(--line-2); transition: background var(--t) var(--ease); }
.theme-row .knob::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(15, 17, 21, .25); transition: inset-inline-start var(--t) var(--ease); }
.theme-row[aria-checked="true"] .knob { background: var(--brand); }
.theme-row[aria-checked="true"] .knob::after { inset-inline-start: 21px; }
.theme-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.menu .danger { color: #B42318; }
:root[data-theme="dark"] .menu .danger { color: #F97066; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu .danger { color: #F97066; } }
.muted-list { margin: 8px 0 0; padding-inline-start: 18px; font-size: 14px; color: var(--ink-3); }

/* ---------- sign-in ---------- */
.gate {
  min-height: calc(100dvh - 56px);
  display: flex; flex-direction: column; justify-content: center;
  max-width: 420px; margin: 0 auto; padding: 32px 16px;
}
.gate h1 { font-size: 30px; font-weight: 700; line-height: 1.2; }
.gate p { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.gate .btn-primary { margin-top: 24px; width: 100%; }
.gate .btn-quiet { margin-top: 8px; align-self: center; }
.gate .error { margin-top: 12px; font-size: 14px; color: #B42318; }
:root[data-theme="dark"] .gate .error { color: #F97066; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gate .error { color: #F97066; } }

.skeleton { height: 76px; border-radius: var(--r-m); background: var(--sunken); }

/* ---------- a conversation (kind 'ask') ---------- */
.chat { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 6px; }
.chat .msg.ai { align-self: stretch; }
.chat-composer {
  position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 5;
  margin-top: 16px; padding-top: 10px;
  background: linear-gradient(to top, var(--bg) 75%, transparent);
}
.chat-composer .composer textarea { min-height: 46px; }
@media (min-width: 1024px) { .chat-composer { bottom: 0; padding-bottom: 12px; } }
.new-examples { margin-top: 18px; }
.people-pick { padding: 12px 0 4px; }
.client-sug:not(:empty) { margin: -4px 0 10px; }
.people-pick .search { width: 100%; }
.people-pick .sug { margin-top: 8px; }

/* ---------- a job being described: the card its conversation fills ---------- */
/* Folded to one line (can pricing start, how much is an unconfirmed standard);
 * open, a plain list of question and answer. Where an answer came from is a
 * word after it, not a badge: fourteen rows of pills would shout. */
.spec-card {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--sh-1);
}
.spec-card summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 16px;
  cursor: pointer; list-style: none;
}
.spec-card summary::-webkit-details-marker { display: none; }
.spec-card summary::after { content: '+'; margin-inline-start: auto; color: var(--ink-3); font-size: 20px; line-height: 1; }
.spec-card[open] summary::after { content: '−'; }
.spec-head { display: flex; flex-direction: column; min-width: 0; }
.spec-title { font-size: 15px; font-weight: 600; }
.spec-sum { font-size: 14px; color: var(--ink-2); }
.spec-rows { margin: 0; padding: 0 16px; border-top: 1px solid var(--line); }
.spec-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec-row dt { font-size: 13px; color: var(--ink-3); }
.spec-row dd { margin: 2px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.spec-tag { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.spec-tag::before { content: ' · '; }
.spec-tag.must { color: var(--ink); font-weight: 600; }
.spec-edit {
  display: flex; align-items: center; min-height: 48px; padding: 0 16px;
  font-size: 14px; color: var(--ink-2);
}
.spec-edit:hover { color: var(--ink); }

/* ---------- a job in pricing: the table its conversation filled ---------- */
/* The same folded card; open, a plain list per section, prices aligned. */
.table-body { padding: 4px 16px 6px; border-top: 1px solid var(--line); }
.table-sec { margin: 14px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.table-rows { margin: 0; }
.table-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.table-row dt { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.table-qty { color: var(--ink-3); white-space: nowrap; }
.table-row dd { margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
/* ---------- a draft: the quote's own details ---------- */
.quote-editor { margin-top: 18px; }
.qe-form { display: grid; gap: 14px; padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.qe-field { display: flex; flex-direction: column; gap: 7px; font-size: 15px; color: var(--ink-3); }
/* At least 16px: a smaller field makes a phone zoom in on focus. */
.qe-field input {
  min-height: 50px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 15px;
  background: var(--bg); color: var(--ink); font-size: 17px;
}
.qe-field input:focus { border-color: var(--line-2); }
.qe-seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.qe-seg legend { float: right; width: 100%; margin-bottom: 6px; padding: 0; font-size: 13px; color: var(--ink-3); }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg-opt span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-full);
  font-size: 14px; color: var(--ink-2);
}
.seg-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.qe-save { justify-self: start; min-width: 120px; }
.table-total { margin-top: 6px; }
.table-total .table-row:last-child { border-bottom: 0; }
.table-total .table-row:last-child dd { color: var(--ink); }

/* ---------- the quote as a file: the A4 sheet, in its own page ---------- */
/* The frame keeps the sheet's real 794px layout (the PDF is photographed from
   it) and is scaled to the column; the stage takes the scaled height. */
.sheet-stage {
  position: relative; margin-top: 20px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: #fff; min-height: 240px;
}
.sheet-frame {
  display: block; width: 794px; height: 1123px; margin-inline: auto;
  border: 0; background: #fff; transform-origin: top right; pointer-events: none;
}
.sheet-stage:not(.ready) { height: 240px; }
.sheet-stage:not(.ready)::after {
  content: 'טוען את ההצעה…'; position: absolute; inset: 0;
  display: grid; place-items: center; background: var(--surface);
  font-size: 14px; color: var(--ink-3);
}
.pdf-after {
  margin-top: 16px; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface);
}
.pdf-after[hidden] { display: none; }
.pdf-after p { flex: 1; min-width: 160px; margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- the pricing table's own fields (W4d-1) ---------- */
/* A row: tick, name, remove on one line; quantity, price and total under it. */
.te-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.te-row.off .te-name { color: var(--ink-3); text-decoration: line-through; }
.te-check { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-start: -10px; }
.te-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.te-name { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.te-lname {
  grid-column: 1 / 3; min-width: 0; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font-size: 16px;
}
.te-del {
  width: 44px; height: 44px; border: 0; border-radius: var(--r-s); background: none;
  color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer;
}
.te-del:hover { background: var(--sunken); color: var(--ink); }
.te-fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.te-num { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
/* 16px: a smaller field makes a phone zoom in on focus. */
.te-num input, .te-add input {
  min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums;
}
.te-num input { width: 92px; }
.te-num input:focus, .te-add input:focus, .te-lname:focus { border-color: var(--line-2); }
.te-static { font-size: 14px; color: var(--ink-2); }
.te-total { margin-inline-start: auto; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.te-empty { margin: 6px 0; font-size: 14px; color: var(--ink-3); }
.te-add { display: grid; grid-template-columns: minmax(0, 1fr) 80px 92px auto; gap: 8px; margin: 10px 0 4px; }
.te-add input { min-width: 0; }
@media (max-width: 480px) {
  .te-add { grid-template-columns: 1fr 1fr auto; }
  .te-add input[name="name"] { grid-column: 1 / -1; }
}
.te-add-labor { margin-top: 10px; }
.te-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px 14px; border-top: 1px solid var(--line);
}
.te-foot .btn-outline:only-child { margin-inline-start: auto; }
.te-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ink-2); }
.te-more:hover { color: var(--ink); }
/* ---------- a draft whose table moved past its quote ---------- */
.stale-note {
  margin-top: 16px; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface);
}
.stale-note p { flex: 1; min-width: 180px; margin: 0; font-size: 15px; color: var(--ink); }
/* ---------- the business details (W6-1) ---------- */
.biz-card { margin-top: 18px; }
.biz-card .qe-form { border-top: 0; }
.biz-card .qe-save { justify-self: stretch; }
/* A long form: its "שמור" stays in sight above the bottom tabs (21.10). */
@media (max-width: 1023px) {
  .biz-card .qe-save { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 0 0 6px var(--surface); }
}
@media (min-width: 720px) { .biz-card .qe-save { justify-self: start; min-width: 240px; } }
.biz-more { margin-top: 14px; }
/* ---------- a conversation under a main action ---------- */
/* The send arrow waits in grey while the box is empty, so the screen's main
   button is the only black one; it turns black as soon as there is text. */
.composer.is-quiet .send { background: var(--sunken); color: var(--ink-2); }
.composer.is-quiet:has(textarea:not(:placeholder-shown)) .send { background: var(--brand); color: #0E1013; }
/* ---------- the quote's lines (W5e) ---------- */
/* A line: its title with ↑ ↓ × beside it, its text under it, its price when
   the quote prices each line. */
.lines-card { margin-top: 18px; }
.ql-mode { margin: 8px 0 4px; }
.ql-row { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ql-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 2px; }
.ql-head .te-lname { grid-column: 1; }
.te-del:disabled { opacity: .3; cursor: default; background: none; }
.ql-text {
  width: 100%; min-height: 64px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.5;
}
.ql-text:focus { border-color: var(--line-2); }
.ql-text:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ql-add { display: grid; gap: 8px; margin-top: 14px; }
.ql-total { margin: 14px 0 4px; font-size: 15px; color: var(--ink-2); }
.ql-base { margin-top: 14px; }
/* ---------- the customer signs on the screen (W5f) ---------- */
/* Full screen over the sheet; the pad keeps its 5:2 bitmap and only its
   picture scales, so turning the phone keeps the drawing. */
.sign-pad {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 12px;
  background: rgba(15, 17, 21, .55);
}
.sign-box {
  width: min(760px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 12px;
  padding: 18px 16px 16px; border-radius: var(--r-l); background: var(--surface); color: var(--ink);
}
.sign-box h2 { font-size: 20px; }
.sign-note { font-size: 14px; color: var(--ink-2); }
.sign-canvas {
  width: 100%; aspect-ratio: 5 / 2; display: block; touch-action: none; cursor: crosshair;
  background: #fff; border: 1px dashed var(--line-2); border-radius: var(--r-s);
}
.sign-hint { font-size: 13px; color: var(--ink-3); }
@media (orientation: landscape) { .sign-hint { display: none; } }
.sign-pad { overscroll-behavior: contain; }
@media (orientation: landscape) and (max-height: 520px) {
  .sign-note { display: none; }
  .sign-box { grid-template-columns: 1fr auto; align-items: end; width: min(900px, 100%); }
  .sign-box h2, .sign-box .qe-field { grid-column: 1 / -1; }
  .sign-canvas { width: auto; height: min(56vh, 260px); justify-self: center; }
  .sign-actions { flex-direction: column; }
}
.sign-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.signed-line { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.signed-line.older { color: #B42318; }
:root[data-theme="dark"] .signed-line.older { color: #F97066; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .signed-line.older { color: #F97066; } }
/* The quote's summary and its own terms, in the details form. */
.qe-field textarea {
  min-height: 88px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.5;
}
.qe-field textarea:focus { border-color: var(--line-2); }
.qe-field textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.qe-pair { display: grid; gap: 14px; }
/* The quote's notes (21.10): his fixed ones with a tick, then the job's own. */
.qe-notes { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.qe-notes legend { float: right; width: 100%; margin-bottom: 4px; padding: 0; font-size: 15px; color: var(--ink-3); }
.qe-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; font-size: 16px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.qe-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); }
.qe-check:has(input:not(:checked)) span { color: var(--ink-3); text-decoration: line-through; }
[data-job-notes] { display: grid; gap: 8px; }
.qe-note {
  width: 100%; min-height: 64px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.5;
}
.qe-note:focus { border-color: var(--line-2); }
.qe-note:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.qe-note-add { justify-self: start; min-height: 44px; }
@media (min-width: 560px) { .qe-pair { grid-template-columns: 1fr 2fr; } }

/* ---------- the people on a job (W7-A, picture 5-contacts) ---------- */
.contacts { margin-top: 22px; }
.contacts-card { padding: 2px 18px 6px; border-radius: var(--r-l); }
.contacts-card:hover { border-color: var(--line); }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.av {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sunken); color: var(--ink-2); font-size: 15px; font-weight: 600;
}
.person .who {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start;
}
button.who { cursor: pointer; min-height: 44px; justify-content: center; }
.person .name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.person .role { margin-top: 1px; font-size: 14px; color: var(--ink-3); }
.ibtn {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none;
}
.ibtn:hover { background: var(--sunken); color: var(--ink); }
.ibtn svg { width: 18px; height: 18px; }
.add-contact {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--brand-ink); font: inherit; font-size: 17px; font-weight: 500;
}
.add-contact svg { width: 20px; height: 20px; }
.contact-form { display: grid; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sug { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 15px; color: var(--ink-3); }
.sug-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px dashed var(--line-2); border-radius: var(--r-full);
  background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
}
.sug-chip:hover { background: var(--sunken); }
.sug-chip svg { width: 16px; height: 16px; }
/* The tick "מקבל את ההצעה" and the mail button (W7-B). */
.box {
  position: relative; width: 26px; height: 26px; flex: none; margin-inline-start: 4px; padding: 0;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-2); border-radius: 8px; background: none; color: #0E1013; cursor: pointer;
}
.box::after { content: ''; position: absolute; inset: -10.5px -8px; } /* 44px tall for the finger (inside a 1.5px border); sideways, half the 16px to its neighbour */
.box.on { background: var(--brand); border-color: var(--brand); }
.box svg { width: 16px; height: 16px; }
.box:disabled { opacity: .5; }
/* After "שלח ללקוח": "וואטסאפ או מייל?", then for mail "לצרף את PDF ההצעה?".
   A sheet from the bottom (W7-C, picture 6-contacts-pdf). */
.mail-scrim {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .6); overscroll-behavior: contain;
}
.mail-sheet {
  width: min(760px, 100%); display: grid; gap: 10px;
  padding: 10px 20px calc(30px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line-2); border-radius: 24px 24px 0 0;
}
.mail-sheet .grab { width: 40px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: var(--line-2); }
/* The erasure's button ("הנתונים שלך", 9.10): the danger red, its text dark on the dark theme's lighter red. */
.btn-primary.btn-danger { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .btn-primary.btn-danger { color: #0E1013; }
.mail-sheet h2 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.mail-sheet h2:focus { outline: none; }
.mail-note { margin: -6px 0 8px; font-size: 15px; line-height: 1.3; color: var(--ink-3); }
.mail-sheet .btn-primary, .mail-sheet .btn-outline { width: 100%; }
/* The client's tracker on his side (12.10): the stages his client sees, in
   the quote row's place once it is approved, each one a tap; and a stage's
   sheet — the note the client reads, the planned day, the tick. */
.track-steps { position: relative; display: flex; justify-content: space-between; align-items: flex-start; margin: 14px 0 4px; }
.track-line, .track-fill { position: absolute; top: 12px; right: 22px; height: 2px; }
.track-line { left: 22px; background: var(--line-2); }
.track-fill { background: var(--brand); }
.track-steps .s {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 0; padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12.5px; line-height: 1.3; text-align: center; cursor: pointer;
}
.track-steps .s .d {
  width: 26px; height: 26px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.track-steps .s.on { color: var(--ink-2); }
.track-steps .s.on .d { background: var(--brand); border-color: var(--brand); color: #0E1013; }
.track-steps .s.now { color: var(--ink); font-weight: 700; }
.track-steps .s.now .d { border-color: #5AA9FF; box-shadow: 0 0 0 4px rgba(90, 169, 255, 0.18); }
:root[data-theme="light"] .track-steps .s.now .d { border-color: #1F6FD1; box-shadow: 0 0 0 4px rgba(31, 111, 209, 0.15); }
:root[data-theme="light"] .track-steps .s.on .d { color: #fff; }
.track-steps .s small { font-size: inherit; overflow-wrap: anywhere; }
.track-steps .s:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
/* A photo the client sees (phase 2): the project's under the row, a stage's in its sheet. */
.track-photo { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; }
.track-photo .link-like { min-height: 44px; }
.track-shot { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--sunken); }
.stage-num { margin: 0; color: var(--brand-ink); font-size: 14px; font-weight: 700; }
.stage-sheet h2 { margin-top: -6px; }
.stage-label { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.stage-note, .stage-plan {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--sunken); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5;
}
.stage-note { min-height: 96px; resize: vertical; }
.stage-plan { min-height: 48px; }
.stage-note:focus-visible, .stage-plan:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* "מה הלקוח רואה" (12.10, picture tr6): his stages, renamed in place, dragged by
   the grip, added and removed. */
.stage-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.stage-row { display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.stage-row.dragging { border-color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.stage-grip, .stage-x {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 10px; background: none; color: var(--ink-3); cursor: pointer;
}
.stage-grip { cursor: grab; touch-action: none; }
.stage-grip svg, .stage-x svg { width: 18px; height: 18px; }
.stage-x:disabled { opacity: .35; cursor: default; }
.stage-name { flex: 1; min-width: 0; height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; }
.stage-name:focus-visible, .stage-grip:focus-visible, .stage-x:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.stage-add {
  width: 100%; min-height: 48px; margin-top: 8px; border: 1px dashed var(--line-2); border-radius: 14px;
  background: none; color: var(--ink-2); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.stage-add:disabled { opacity: .5; cursor: default; }
.stage-hint { margin: 22px 0 0; font-size: 13px; color: var(--ink-3); }
.stage-reset { display: block; margin: 14px auto 0; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; }
/* "בקשת מקדמה" (item 6, picture d3-sheet): the share as chips, the message
   as the client will read it, on the brand's tint. */
.dep-chips { display: flex; gap: 10px; }
.dep-chips button {
  flex: 1; height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-full);
  background: none; color: var(--ink-2); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
}
.dep-chips button[aria-checked="true"] { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-ink); }
.dep-text {
  padding: 14px 16px; border-radius: 14px; background: var(--brand-tint); color: var(--ink);
  font-size: 16px; line-height: 1.55; white-space: pre-line;
}
.dep-nopay { margin: 0; }
.link-like { padding: 0; border: 0; background: none; color: var(--brand-ink); font: inherit; text-decoration: underline; cursor: pointer; }
/* The sheet the mail's PDF is made from: a page of its own, off the screen. */
.sheet-frame.sheet-offstage { position: fixed; top: 0; left: -10000px; margin: 0; }

/* ---------- "עיצוב ההצעה" (T10, Stav's pick l2, 6.10) ---------- */
.design-title { font-size: 30px; font-weight: 700; line-height: 1.2; }
.seg3 {
  display: flex; margin: 6px 0 14px; padding: 4px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-full);
}
.seg3 button {
  flex: 1; height: 40px; padding: 0 6px; border: 0; border-radius: var(--r-full);
  background: none; color: var(--ink-3); font: inherit; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.seg3 button[aria-checked="true"] { background: var(--line-2); color: var(--ink); font-weight: 600; }
/* The chosen look on white at the column's width, cropped at 430. */
.tpl-big {
  position: relative; height: 430px; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--line); background: #fff;
}
.tpl-frame {
  position: absolute; top: 0; right: 0; width: 794px; height: 1123px; border: 0;
  transform-origin: top right; opacity: 0; transition: opacity var(--t) var(--ease);
}
.tpl-big.ready .tpl-frame { opacity: 1; }
.logo-row {
  display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
}
.logo-tile {
  width: 56px; height: 56px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 14px; background: #14161b; border: 1px solid var(--line); color: #38C172;
}
.logo-tile svg { width: 22px; height: 22px; }
.logo-tile .logo-add { display: grid; color: var(--ink-3); }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-text { flex: 1; min-width: 0; }
.logo-text b { display: block; font-size: 17px; font-weight: 600; }
.logo-text span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.logo-row .logo-btn { min-height: 38px; height: 38px; padding: 0 16px; font-size: 15px; }
/* His letterhead's two rows (item 7): "רקע לדף" and the "נייר מכתבים" switch. */
.logo-row .bg-clear { min-height: 38px; padding: 0 8px; }
.wide-row { width: 100%; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.wide-row[aria-disabled="true"] { cursor: default; }
.wide-row[aria-disabled="true"] .knob { opacity: .45; }
/* "העלאת הצעה קיימת" (item 8): what was found waits here for "שמירה". */
.imp-confirm { border-color: var(--brand); }
[data-import-slot]:empty { display: none; }

/* ---------- the board inside Zerem follows Zerem's theme ----------
   board-view.css (the board session's) gives .bv--zerem V4's DARK values as
   literals, so in a light Zerem the board was light text on a light page.
   Here, one step stronger (.bv.bv--zerem), the same names take V4's tokens:
   in dark they resolve to exactly those literals; in light they follow.
   docs/v4/THEME-RESEARCH.md §4. */
.bv.bv--zerem {
  --bv-ink: var(--ink); --bv-muted: var(--ink-3); --bv-card: var(--surface); --bv-card-border: var(--line);
  --bv-line: var(--line); --bv-line-2: var(--line-2); --bv-track: var(--line); --bv-head: var(--sunken);
  --bv-input: var(--bg); --bv-primary: var(--brand); --bv-primary-ink: #0E1013;
}
/* The blue (on him) and the amber (waiting) were made for dark: 2.8 and 1.8 to 1 on white. */
:root[data-theme="light"] .bv.bv--zerem { --bv-you: #1F6FD1; --bv-wait: #9A6200; }
.bv--zerem .bv-stage.ok { color: var(--brand-ink); }
.bv--zerem .bv-stage.done { color: var(--ink-2); }

/* A plan's limit, and whom to ask (the full review, 7.10): the toast's one link. The toast lets taps through; its link takes them. */
.ask-toast .toast-act { pointer-events: auto; margin-inline-start: 6px; color: var(--brand); font-weight: 700; text-decoration: underline; white-space: nowrap; }
/* "בטל" (holdMove): a button, 44px to tap inside the toast's own line. */
.ask-toast button.toast-act { position: relative; margin: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; }
.ask-toast button.toast-act::before { content: ''; position: absolute; inset: -12px -10px; }

/* "עוסק פטור או מורשה?" over a quote's price while the kind is unknown (12.10):
   one line, its answers 36px chips with a 44px tap. */
.kind-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: 14px; color: var(--ink-2); }
.kind-ask span { margin-inline-end: 2px; }
.kind-ask button { position: relative; min-height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-full); background: none; color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; }
.kind-ask button::before { content: ''; position: absolute; inset: -5px 0; }
.kind-ask button:disabled { opacity: .5; }

/* ---------- "כמה לשים בצד" (Stav's pick, 12.10, general/zerem-options/tax) ---------- */
/* The pictures' sizes (t1, t2, t5, t6, t4) on V4's tokens. Blue is the income
   tax, amber what is next, green what is done; on white, the board's darker
   blue and amber (their contrast was checked there). */
.menu .menu-two { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding-block: 8px; }
.menu-two small { font-size: 13px; color: var(--ink-3); }
.tax, .tax-sheet { --tx-amber: #F2B23A; --tx-amber-tint: rgba(242, 178, 58, .12); --tx-amber-line: #6B5523; --tx-blue: #5B8DEF; --tx-violet: #A78BFA; --tx-green-line: #24563A; }
:root[data-theme="light"] .tax, :root[data-theme="light"] .tax-sheet { --tx-amber: #9A6200; --tx-amber-tint: #FBF1DE; --tx-amber-line: #E3C48C; --tx-blue: #1F6FD1; --tx-violet: #6D3FD8; --tx-green-line: #A9D6B9; }
.tax h1 { font-size: 30px; line-height: 1.2; font-weight: 700; }
.tax-card { margin-top: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.tax-k { font-size: 14px; color: var(--ink-2); }
.tax-h { margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.tax-mute { font-size: 13px; color: var(--ink-3); }
.tax-foot { margin: 18px 2px 0; font-size: 13px; color: var(--ink-3); }
/* The business, read from פרטי העסק, and the salary's chip. */
.tax-names { display: flex; gap: 8px; margin-top: 14px; }
.tax-name { flex: 1; min-width: 0; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tax-name small { display: block; font-size: 12px; color: var(--ink-3); }
.tax-name b { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tax-add { min-height: 56px; border-style: dashed; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.tax-job { display: flex; align-items: center; gap: 2px; padding-inline-end: 2px; }
.tax-job:focus-within { border-color: var(--tx-blue); }
.tax-job label { flex: 1; min-width: 0; }
.tax-job input { width: 100%; min-height: 26px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; outline: none; }
.tax-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink-3); cursor: pointer; }
.tax-x svg { width: 16px; height: 16px; }
.tax-q { font-size: 16px; font-weight: 600; }
.tax-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.tax-kinds button { flex: 1 1 auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-full); background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
/* The number. */
.tax-big { margin-top: 2px; font-size: 44px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tax-big span { font-size: 18px; font-weight: 600; color: var(--ink-2); }
.tax-split { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.tax-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 5px; border-radius: 50%; }
.tax-dot.t { background: var(--tx-blue); }
.tax-dot.b { background: var(--tx-amber); }
.tax-dot.p { background: var(--tx-violet); }
.tax-credits { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -2px 0 -12px; padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; }
.tax-credits svg { width: 14px; height: 14px; }
.tax-credits input { width: 58px; height: 32px; padding: 0 6px; border: 1px solid var(--tx-blue); border-radius: 8px; background: var(--sunken); color: var(--ink); font: inherit; font-size: 15px; text-align: center; outline: none; }
.tax-ask { font-size: 20px; font-weight: 700; line-height: 1.3; }
.tax-seg { margin: 12px 0 0; }
.tax-pay .tax-seg { margin: 4px 0 0; }
/* A figure he types: a field from the first look, the keypad's digits in it. */
.tax-num {
  width: 104px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px;
  background: var(--sunken); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: left; direction: ltr;
}
.tax-num:focus { border-color: var(--tx-blue); box-shadow: 0 0 0 1px var(--tx-blue); outline: none; }
.tax-num::placeholder { color: var(--ink-3); font-weight: 400; }
.tax-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid var(--line); font-size: 15px; }
.tax-row:first-child { border-top: 0; }
.tax-tag { margin-inline-start: 6px; padding: 1px 7px; border: 1px solid var(--tx-green-line); border-radius: var(--r-full); color: var(--brand-ink); font-size: 11px; font-style: normal; }
.tax-warn { margin-top: 8px; font-size: 13px; color: var(--tx-amber); }
.tax-warn.over { color: var(--danger); }
/* The months (t2, t6): a row each, 44px; the fields come column by column in
   the page, so "הבא" goes down a month, and are placed here by row and column. */
.tax-table { display: grid; grid-template-columns: 34px repeat(2, minmax(0, 1fr)) 82px; grid-auto-rows: minmax(44px, auto); column-gap: 6px; align-items: center; padding: 6px 10px; }
.tax-table.cols-3 { grid-template-columns: 34px repeat(3, minmax(0, 1fr)) 78px; column-gap: 4px; }
.tax-th { align-self: end; padding-bottom: 4px; font-size: 13px; line-height: 1.2; color: var(--ink-3); text-align: left; }
.tax-th small { display: block; font-size: 10.5px; }
.tax-th.pay { text-align: center; }
.tax-mon { font-size: 13.5px; color: var(--ink-2); }
.tax-mon.est, .tax-cell.est { color: var(--ink-3); }
.tax-cell { width: 100%; height: 40px; padding: 0 4px; background: none; font-size: 15px; font-weight: 500; }
.tax-cell:focus { background: var(--sunken); }
.tax-cell.auto { background: radial-gradient(circle at calc(100% - 3px) 50%, var(--brand) 2.5px, transparent 3px); padding-right: 10px; }
.tax-auto { display: inline-block; width: 6px; height: 6px; margin-inline-end: 6px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.tax-legend { margin: 6px 4px 0; }
.tax-pcell { align-self: stretch; margin: 3px 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.tax-pcell b { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tax-pcell small { font-size: 11px; color: var(--ink-3); }
.tax-pcell.on { background: var(--brand-tint); border-color: var(--tx-green-line); }
.tax-pcell.on b { color: var(--brand-ink); }
.tax-pcell.now { background: var(--tx-amber-tint); border-color: var(--tx-amber-line); }
.tax-pcell.now b { color: var(--tx-amber); }
.tr-1 { grid-row-start: 1; } .tr-2 { grid-row-start: 2; } .tr-3 { grid-row-start: 3; } .tr-4 { grid-row-start: 4; } .tr-5 { grid-row-start: 5; }
.tr-6 { grid-row-start: 6; } .tr-7 { grid-row-start: 7; } .tr-8 { grid-row-start: 8; } .tr-9 { grid-row-start: 9; } .tr-10 { grid-row-start: 10; }
.tr-11 { grid-row-start: 11; } .tr-12 { grid-row-start: 12; } .tr-13 { grid-row-start: 13; }
.tc-1 { grid-column: 1; } .tc-2 { grid-column: 2; } .tc-3 { grid-column: 3; } .tc-4 { grid-column: 4; } .tc-5 { grid-column: 5; }
.tax-pcell.span2 { grid-row-end: span 2; }
.tax-sum { display: flex; padding: 12px 6px; text-align: center; }
.tax-sum > div { flex: 1; }
.tax-sum > div + div { border-inline-start: 1px solid var(--line); }
.tax-sum b { display: block; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tax-sum b.ok { color: var(--brand-ink); }
.tax-sum b.warn { color: var(--tx-amber); }
.tax-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; margin-top: 12px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--ink); font: inherit; font-size: 15px; text-align: start; cursor: pointer;
}
/* "מקדמות מס הכנסה": the circles a picture of the year, one tap that opens them all. */
.tax-dots { position: relative; display: flex; justify-content: space-between; width: 100%; margin: 14px 0 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tax-line, .tax-fill { position: absolute; top: 13px; height: 2px; }
.tax-line { right: 24px; left: 24px; background: var(--line-2); }
.tax-fill { right: 24px; width: calc((100% - 48px) * var(--fill, 0)); background: var(--brand); }
.tax-step { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); }
.tax-step .d { width: 28px; height: 28px; box-sizing: border-box; display: grid; place-items: center; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); font-size: 14px; font-weight: 700; }
.tax-step small { font-size: inherit; white-space: nowrap; }
.tax-step.on { color: var(--ink-2); }
.tax-step.on .d { background: var(--brand); border-color: var(--brand); color: #0E1013; }
:root[data-theme="light"] .tax-step.on .d { color: #fff; }
.tax-step.now { color: var(--tx-amber); font-weight: 700; }
.tax-step.now .d { border-color: var(--tx-amber); box-shadow: 0 0 0 4px var(--tx-amber-tint); }
.tax-dots.many .tax-step .d { width: 20px; height: 20px; font-size: 11px; }
.tax-dots.many .tax-step { gap: 4px; font-size: 10.5px; }
.tax-dots .quiet { visibility: hidden; }
.tax-dots:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 10px; }
.tax-next { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.tax-next-k { display: flex; flex-direction: column; min-width: 0; }
.tax-next-amt { display: inline-flex; align-items: baseline; gap: 4px; color: var(--tx-amber); font-size: 22px; font-weight: 700; }
.tax-next-amt .tax-num { width: auto; field-sizing: content; min-width: 3ch; height: 40px; padding: 0 6px; margin-inline-start: -6px; background: none; color: var(--tx-amber); font-size: 22px; font-weight: 700; }
.tax-paid { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--brand); color: #0E1013; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
:root[data-theme="light"] .tax-paid { color: #fff; }
.tax-vat { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.tax-bl { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.tax-done { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--brand-ink); }
/* The year-end (1.12–30.4 only, Stav's rule). */
.tax-end.over { background: var(--brand-tint); border-color: var(--tx-green-line); }
.tax-end.over .tax-big { color: var(--brand); }
.tax-end.under { background: var(--tx-amber-tint); border-color: var(--tx-amber-line); }
.tax-end.under .tax-big { color: var(--tx-amber); }
.tax-end .tax-big { font-size: 40px; }
.tax-end-line { font-size: 15px; }
.tax-why { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.tax-end-more summary { min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.tax-end-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tax-end-table th, .tax-end-table td { padding: 8px 0; border-top: 1px solid var(--line); font-weight: 400; text-align: left; }
.tax-end-table thead th { border-top: 0; font-size: 12.5px; color: var(--ink-3); }
.tax-end-table th:first-child { text-align: right; }
.tax-end-table tr.worst td:last-child { color: var(--brand-ink); font-weight: 700; }
/* The periods' sheet: a 44px row each. */
.tax-sheet { max-height: 88vh; overflow-y: auto; }
.tax-periods { margin: 0; padding: 0; list-style: none; }
.tax-prow { display: flex; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid var(--line); }
.tax-plabel { flex: 1; font-size: 15px; }
.tax-plabel small { display: block; font-size: 12px; color: var(--ink-3); }
.tax-pdue { color: var(--ink-3); font-variant-numeric: tabular-nums; }
