/* Hasama — candidate-facing pages (Hebrew, right-to-left, mobile first). */
:root {
  color-scheme: light;
  --bg: #f9f9f7;
  --surface: #ffffff;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #6f6d68;
  --border: rgba(11, 11, 11, 0.12);
  --accent: #2a78d6;
  --accent-hover: #256abf;
  --wash: rgba(42, 120, 214, 0.08);
  --bad: #d03b3b;
  --good: #0ca30c;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #1a1a19;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #9a988f;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #3987e5;
    --accent-hover: #5598e7;
    --wash: rgba(57, 135, 229, 0.14);
  }
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--accent); }
.pub-head { max-width: 720px; margin: 0 auto; padding: 18px 16px 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pub-brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 19px; color: var(--text); text-decoration: none; }
.pub-brand .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; }
.pub-tag { color: var(--muted); font-size: 14px; }
.pub-main { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; }
.pub-foot { max-width: 720px; margin: 0 auto; padding: 18px 16px 36px; display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
.pub-foot a { color: var(--muted); }
h1 { font-size: 26px; line-height: 1.25; margin: 10px 0 12px; }
h2 { font-size: 19px; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.job, .apply, .hero { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-top: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { background: var(--wash); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.job-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.apply h2 { margin-top: 0; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.qbtn { flex: 1 1 140px; text-align: center; padding: 12px 14px; border-radius: 10px; font-weight: 650; text-decoration: none; color: #fff; background: #1a8f62; }
.qbtn.tg { background: #2a78d6; }
.qbtn.fb { background: #5a4bd1; }
.qbtn:hover { filter: brightness(1.08); }
.or { margin: 18px 0 6px; }
.f { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.f label { font-weight: 600; font-size: 15px; }
input[type=text], input[type=tel], input[type=email], textarea { font: inherit; color: var(--text); background: var(--surface); width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; min-height: 46px; }
input[type=file] { font: inherit; font-size: 15px; }
textarea { resize: vertical; }
input:focus, textarea:focus, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.f.bad input, .f.bad textarea { border-color: var(--bad); }
.msg, .bad-msg { color: var(--bad); font-size: 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin: 6px 0 4px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.consent.bad span { color: var(--bad); }
.submit { width: 100%; margin-top: 16px; font: inherit; font-weight: 700; font-size: 17px; padding: 14px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
.submit:hover { background: var(--accent-hover); }
.submit[disabled] { opacity: 0.6; }
.err-box { background: rgba(208, 59, 59, 0.1); color: var(--bad); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.hero { text-align: center; padding: 30px 20px; }
.hero p { color: var(--text-2); }
.job-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.job-list a { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; flex-wrap: wrap; }
.job-list a:hover { border-color: var(--accent); }
.job-list span { color: var(--muted); }
.home-hero { padding: 34px 20px 30px; }
.home-hero h1 { font-size: 30px; margin-top: 0; }
.home-hero p { max-width: 540px; margin: 8px auto 0; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.btn-main, .btn-alt { flex: 0 1 230px; text-align: center; padding: 12px 20px; border-radius: 10px; font-weight: 650; text-decoration: none; }
.btn-main { background: var(--accent); color: #fff; }
.btn-main:hover { background: var(--accent-hover); }
.btn-alt { background: var(--wash); color: var(--accent); }
.btn-alt:hover { filter: brightness(0.97); }
h2 .count { display: inline-block; min-width: 26px; padding: 0 8px; margin-inline-start: 6px; border-radius: 999px; background: var(--wash); color: var(--accent); font-size: 14px; text-align: center; vertical-align: middle; }
#jobs, #contact { scroll-margin-top: 12px; }
.qbtn.tel, .qbtn.mail { background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: 600; overflow-wrap: anywhere; }
.center { text-align: center; }
.check-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--good); margin: 0 auto 10px; position: relative; }
.check-mark::after { content: ""; position: absolute; left: 21px; top: 13px; width: 12px; height: 22px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.hint { font-size: 14px; }

/* website chat (templates/public/_chat.html, static/chat.js) */
.chat[hidden], .chat [hidden] { display: none !important; }
.chat { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 50; font-size: 15px; }
.chat-fab { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.chat-fab:hover { background: var(--accent-hover); }
.chat.open .chat-fab { display: none; }
.chat-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.chat-panel { width: min(370px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22); overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--accent); color: #fff; }
.chat-head strong { display: block; }
.chat-sub { font-size: 13px; opacity: 0.85; }
.chat-x { border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; width: 38px; height: 38px; border-radius: 8px; cursor: pointer; flex: none; }
.chat-x:hover { background: rgba(255, 255, 255, 0.16); }
.chat-thread { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-start-start-radius: 4px; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-start-end-radius: 4px; }
.bubble.note { align-self: center; background: var(--wash); color: var(--text-2); font-size: 13px; text-align: center; }
.bubble .at { display: block; font-size: 11px; opacity: 0.7; margin-top: 2px; }
.chat-start, .chat-compose { padding: 10px 12px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.chat input[type=text], .chat input[type=tel], .chat textarea { min-height: 40px; padding: 8px 10px; font-size: 15px; border-radius: 8px; }
.chat-compose { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.chat-compose textarea { flex: 1; min-width: 0; resize: none; max-height: 120px; }
.chat-send { padding: 10px 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.chat-send:hover { background: var(--accent-hover); }
.chat-send[disabled] { opacity: 0.6; }
.chat-err { color: var(--bad); font-size: 13px; width: 100%; }
.chat-err:empty { display: none; }
.chat .consent { font-size: 12.5px; margin: 0; }
.chat .consent input { width: 18px; height: 18px; }
.has-chat .pub-foot { padding-bottom: 88px; }
@media (max-width: 520px) {
  .chat { inset-inline-end: 12px; bottom: 12px; }
  .chat.open { inset: 0; }
  .chat.open .chat-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
}
