/* עיצוב נקי וחם, בצבעי המותג: זהב, כחול חשמלי וסגול */
@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;700&family=Rubik:wght@500;700;800&display=swap");

:root {
  --bg: #faf8f4;
  --card: #ffffff;
  --ink: #0b0d12;
  --muted: #5b6270;
  --gold: #d4a64a;
  --blue: #3b8eea;
  --purple: #8a6fe0;
  --line: #e7e3da;
  --soft-blue: #eaf3fe;
  --soft-gold: #fbf4e4;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(11, 13, 18, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Heebo", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Rubik", "Heebo", sans-serif;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }

.wrap { max-width: 760px; margin: 0 auto; padding: 24px 18px 64px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Rubik", sans-serif; font-weight: 700; color: var(--muted);
  font-size: 15px; margin-bottom: 8px;
}
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }

.lead { color: var(--muted); margin: 0 0 24px; }

/* ---------- תרשים הזרימה ---------- */
.flow { display: grid; gap: 0; }

.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  margin-bottom: 18px;
}
.step::after {
  content: "";
  position: absolute;
  bottom: -18px; right: 50%;
  width: 2px; height: 18px;
  background: var(--line);
}
.step:last-child::after { display: none; }

.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }

.badge {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Rubik", sans-serif; font-weight: 800;
  background: var(--soft-gold); color: var(--ink);
  border: 2px solid var(--gold);
}

.step.done .badge { background: var(--gold); color: #fff; }
.step.done .badge::before { content: "✓"; }
.step.done .badge span { display: none; }

.step.locked { opacity: 0.55; }
.step.active { border-color: var(--blue); box-shadow: 0 10px 32px rgba(59, 142, 234, 0.15); }
.step.active .badge { background: var(--blue); border-color: var(--blue); color: #fff; }

.step-body { display: none; margin-top: 14px; }
.step.active .step-body { display: block; }

.hint { color: var(--muted); font-size: 15px; margin: 0 0 14px; }

/* ---------- טפסים ---------- */
label { display: block; font-weight: 500; margin: 14px 0 6px; }
input[type="text"], textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--soft-blue); }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

.btn {
  font: inherit; font-family: "Rubik", sans-serif; font-weight: 700; font-size: 17px;
  border: 0; border-radius: 14px; padding: 13px 22px; cursor: pointer;
  background: var(--blue); color: #fff; text-decoration: none; display: inline-block;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { background: #c9d0da; cursor: not-allowed; transform: none; }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--line); }
.btn.small { padding: 9px 14px; font-size: 15px; }

.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* חומר שהועלה */
.material {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  background: #fff;
}
.material-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.count { font-size: 14px; color: var(--muted); }

.questions li { margin-bottom: 8px; }
ol.questions { padding-inline-start: 22px; }

.notice {
  background: var(--soft-gold); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; margin-top: 14px; color: var(--ink);
}
.error { background: #fdecec; color: #8a1c1c; border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 15px; }

/* ---------- צ'אט ---------- */
.chat {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-start; background: var(--soft-blue); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-end; background: var(--soft-gold); border-bottom-left-radius: 4px; }
.msg .src { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input { flex: 1; }

/* ---------- סיום ---------- */
.result { display: grid; gap: 16px; margin-top: 14px; }
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-box img, .qr-box canvas { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.link-box {
  word-break: break-all; font-size: 14px; direction: ltr; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
}

.hidden { display: none !important; }

@media (max-width: 480px) {
  .wrap { padding: 16px 12px 48px; }
  .step { padding: 18px 16px; }
  .qr-box img, .qr-box canvas { width: 170px; height: 170px; }
}
