:root {
  --navy: #14213d; --navy-2: #24365e; --gold: #b8892b; --gold-soft: #f4ead2;
  --bg: #f5f4f0; --card: #fff; --line: #e2dfd6; --text: #1d2433; --muted: #667085;
  --ok: #1f7a4d; --ok-soft: #e3f3ea; --bad: #b3261e; --bad-soft: #fbe9e7; --warn: #8a5a00; --warn-soft: #fff3d6;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,33,61,.06), 0 4px 16px rgba(20,33,61,.06);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55;
  font-family: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", Arial, system-ui, sans-serif; }
a { color: var(--navy-2); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; } .grow { flex: 1; }

.topbar { background: var(--navy); color: #fff; padding: .6rem 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.topbar .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: .2px; white-space: nowrap; margin-inline-end: auto; }
.topbar .brand span { color: #e7c873; }
.topbar .who { font-size: .9rem; opacity: .9; }
.topbar button, .topbar .btn { white-space: nowrap; }
.topbar button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
@media (max-width: 560px) { .topbar span.who { display: none; } .topbar .brand { font-size: 1rem; } .topbar button, .topbar .btn { padding: .3rem .55rem; font-size: .8rem; } }
.wrap { max-width: 860px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.wrap.wide { max-width: 1240px; } .wrap.narrow { max-width: 460px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row.nowrap { flex-wrap: nowrap; align-items: flex-start; }
.row.nowrap input[type=checkbox] { margin-top: .35rem; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; color: var(--navy); }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid #cfcbbf; border-radius: 9px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus, button:focus-visible, .chip:focus-visible { outline: 3px solid rgba(184,137,43,.35); outline-offset: 1px; border-color: var(--gold); }
textarea { min-height: 7rem; resize: vertical; }
.field { margin-bottom: .9rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }

button, .btn { font: inherit; cursor: pointer; border-radius: 9px; padding: .6rem 1.1rem; border: 1px solid var(--navy); background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--navy-2); }
button:disabled { opacity: .55; cursor: default; }
button.ghost, .btn.ghost { background: #fff; color: var(--navy); border-color: #cfcbbf; }
button.ghost:hover, .btn.ghost:hover { background: #f3f1ea; }
button.gold, .btn.gold { background: var(--gold); border-color: var(--gold); }
button.wa, .btn.wa { background: #1f8f4e; border-color: #1f8f4e; }
button.danger { background: #fff; color: var(--bad); border-color: #e3b5b1; }
button.sm, .btn.sm { padding: .3rem .65rem; font-size: .85rem; }
button.link { background: none; border: none; color: var(--navy-2); padding: 0; text-decoration: underline; font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid #cfcbbf; background: #fff; color: var(--text); border-radius: 999px; padding: .35rem .8rem; font-size: .9rem; font-weight: 400; cursor: pointer; }
.chip:hover { background: #f3f1ea; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tag { display: inline-block; background: var(--gold-soft); color: #5c4410; border-radius: 6px; padding: .1rem .5rem; font-size: .8rem; margin: .1rem; }
.tag.gray { background: #eceae3; color: #444; } .tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.warn { background: var(--warn-soft); color: var(--warn); }

.msg { padding: .65rem .85rem; border-radius: 9px; margin-bottom: .8rem; font-size: .92rem; }
.msg.err { background: var(--bad-soft); color: var(--bad); } .msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.info { background: var(--gold-soft); color: #5c4410; }

.steps { display: flex; gap: .4rem; margin-bottom: 1rem; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--gold); }

.searchbox textarea { min-height: 5.5rem; font-size: 1.05rem; }
.result { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; background: #fff; }
.result .name { font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.result .rank { background: var(--gold); color: #fff; border-radius: 50%; width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; }
.reasons { margin: .5rem 0; padding: 0; list-style: none; }
.reasons li { padding-inline-start: 1.2rem; position: relative; font-size: .92rem; }
.reasons li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.stars button { background: none; border: none; font-size: 1.6rem; padding: 0 .1rem; color: #cfcbbf; }
.stars button.on { color: var(--gold); }

.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 1rem; }
.tabs button { background: none; color: var(--muted); border: none; border-radius: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: .6rem .9rem; }
.tabs button.on { color: var(--navy); border-bottom-color: var(--gold); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.kpi b { display: block; font-size: 1.6rem; color: var(--navy); line-height: 1.2; }
.kpi span { font-size: .82rem; color: var(--muted); }
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: start; padding: .5rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #faf9f5; color: var(--navy); white-space: nowrap; position: sticky; top: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: #faf7ee; }
td.num, th.num { text-align: center; white-space: nowrap; }
.bar { height: .6rem; background: var(--gold); border-radius: 3px; min-width: 2px; }
.bar.w0 { width: 2%; } .bar.w1 { width: 10%; } .bar.w2 { width: 20%; } .bar.w3 { width: 30%; } .bar.w4 { width: 40%; } .bar.w5 { width: 50%; }
.bar.w6 { width: 60%; } .bar.w7 { width: 70%; } .bar.w8 { width: 80%; } .bar.w9 { width: 90%; } .bar.w10 { width: 100%; }
.barcell { width: 40%; }
dl.kv { display: grid; grid-template-columns: 9.5rem 1fr; gap: .3rem .75rem; margin: 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.modal { position: fixed; inset: 0; background: rgba(20,33,61,.45); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; z-index: 10; }
.modal > .card { width: 100%; max-width: 760px; }
.copybox { direction: ltr; background: #f3f1ea; border: 1px dashed #cfcbbf; border-radius: 8px; padding: .5rem .65rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; overflow-wrap: anywhere; }
.qr { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 8px; }
.hero { text-align: center; padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2rem; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; }

/* שפות */
html.i18n-pending body { visibility: hidden; }
.langsw { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); padding: .3rem .6rem; font-size: .8rem; border-radius: 9px; }

/* הצגה / הסתרה של סיסמה */
.pwwrap { position: relative; display: block; }
html[dir=rtl] .pwwrap input { padding-left: 4.6rem; }
html[dir=ltr] .pwwrap input { padding-right: 5.2rem; }
.pwtoggle, .topbar .pwtoggle { position: absolute; inset-inline-end: .3rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--navy-2);
  font-size: .8rem; font-weight: 600; padding: .35rem .5rem; border-radius: 7px; }
.pwtoggle:hover { background: #f3f1ea; }
label .hint { display: block; font-weight: 400; margin-top: 0; }
.badge { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-inline-start: .35rem; border-radius: 999px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.3rem; text-align: center; }

/* ---------- עמוד הבית של המשתמש ---------- */
.dash { padding-top: 0; }
.dash { padding-top: 1.25rem; }
.dhero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem 2rem; align-items: center; background: linear-gradient(135deg, #14213d 0%, #1f3157 60%, #2a4170 100%);
  color: #fff; border-radius: 16px; padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; box-shadow: 0 8px 24px rgba(20,33,61,.18); position: relative; overflow: hidden; min-height: 8.5rem; }
.dhero::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; background: linear-gradient(90deg, #b8892b, #e7c873, #b8892b); }
.hero-kicker { font-size: .8rem; letter-spacing: .3px; color: #e7c873; margin-bottom: .2rem; }
.dhero h1 { color: #fff; font-size: 1.7rem; margin: 0 0 .25rem; }
.dhero p { margin: 0; color: rgba(255,255,255,.78); font-size: .95rem; }
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(8.5rem, 1fr); gap: .6rem; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: start; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 12px;
  padding: .7rem .9rem; color: #fff; font-weight: 400; min-height: 4.6rem; }
.tile:hover:not(:disabled) { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.tile-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: #e7c873; font-variant-numeric: tabular-nums; }
.tile-label { font-size: .82rem; color: rgba(255,255,255,.85); line-height: 1.3; }
.tile.hot { background: #e7c873; border-color: #e7c873; } .tile.hot .tile-num, .tile.hot .tile-label { color: #14213d; }
.tile.hot:hover:not(:disabled) { background: #f0d68c; border-color: #f0d68c; }
.tile.fresh { border-color: #e7c873; }
.tile.zero, .tile:disabled { opacity: 1; cursor: default; background: transparent; border-style: dashed; border-color: rgba(255,255,255,.18); }
.tile.zero .tile-num { color: rgba(255,255,255,.45); } .tile.zero .tile-label { color: rgba(255,255,255,.55); }
@media (max-width: 760px) { .dhero { grid-template-columns: 1fr; padding: 1.25rem; } .tiles { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile { padding: .55rem .6rem; min-height: 4.2rem; } .tile-num { font-size: 1.4rem; } .tile-label { font-size: .72rem; } .dhero h1 { font-size: 1.4rem; } }

.dash-main { display: flex; flex-direction: column; min-width: 0; }
.dash-main.feed-first #feed { order: -1; margin-bottom: 1.25rem; }

/* לשוניות בתוך ריבוע החיפוש */
.ctabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.35rem 0 1rem; }
.ctab { background: none; border: none; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: .45rem .9rem; margin-bottom: -1px; font-weight: 600; }
.ctab:hover { background: none; color: var(--navy); }
.ctab.on { color: var(--navy); border-bottom-color: var(--gold); }
.mine { display: flex; flex-direction: column; min-height: 0; }
.mine-list { flex: 1; min-height: 0; overflow-y: auto; padding-inline-end: .25rem; }
.mine-list .scard { background: #fbfaf6; }

.section-head { display: flex; align-items: center; gap: .75rem; margin: .25rem 0 .75rem; }
.section-head h2 { margin: 0; font-size: 1.2rem; }
.range { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; }
.range select { width: auto; padding: .35rem .6rem; font-size: .88rem; }
.count { display: inline-block; min-width: 1.5rem; text-align: center; background: #eceae3; color: #444; border-radius: 999px; font-size: .78rem; padding: 0 .45rem; line-height: 1.4rem; }

.searchbox { border-top: 4px solid var(--gold); }
.searchbox textarea { min-height: 4.5rem; }
.examples { margin-top: .5rem; }
.examples .chip { font-size: .8rem; border-radius: 10px; text-align: start; color: var(--muted); }
.understood { background: #fbf8ef; }

.segs { display: inline-flex; background: #eceae3; border-radius: 10px; padding: 3px; margin-bottom: .9rem; }
.seg { background: transparent; color: var(--muted); border: none; border-radius: 8px; padding: .35rem .9rem; font-weight: 600; font-size: .9rem; }
.seg:hover { background: rgba(255,255,255,.6); }
.seg.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20,33,61,.15); }
.seg.on .count { background: var(--navy); color: #fff; }

.conv { background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--navy-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: .9rem; }
.conv.in { border-inline-start-color: var(--gold); }
.conv.is-new { box-shadow: 0 0 0 2px rgba(184,137,43,.35), var(--shadow); }
.conv-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .6rem; }
.conv .name { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.row.tight { gap: .4rem; }
.avatar { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--navy); color: #e7c873; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.conv.in .avatar { background: var(--gold); color: #fff; }
.badge-new { background: var(--bad); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: .05rem .5rem; }
.iconbtn, .topbar .iconbtn { flex: none; background: none; border: none; color: #a09c90; padding: .15rem .4rem; font-size: .85rem; border-radius: 6px; font-weight: 400; line-height: 1; }
.iconbtn:hover { background: var(--bad-soft); color: var(--bad); }
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--bad-soft); color: var(--bad); border-radius: 9px; padding: .5rem .75rem; margin-bottom: .6rem; font-size: .9rem; }

.thread { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .6rem; }
.bubble { max-width: 88%; padding: .5rem .8rem; border-radius: 14px; font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.theirs { align-self: flex-start; background: #f1efe8; border-start-start-radius: 4px; }
.bubble.mine { align-self: flex-end; background: #e6ecf8; border-start-end-radius: 4px; }
.bubble.fresh { box-shadow: 0 0 0 2px rgba(184,137,43,.4); }
.bubble-meta { display: flex; align-items: center; gap: .25rem; font-size: .72rem; color: var(--muted); margin-bottom: .1rem; white-space: normal; }
.bubble-meta .iconbtn { margin-inline-start: auto; font-size: .7rem; opacity: 0; }
.bubble:hover .iconbtn, .bubble .iconbtn:focus-visible { opacity: 1; }
@media (hover: none) { .bubble-meta .iconbtn { opacity: .6; } }
.conv-actions { margin-bottom: .6rem; }
.reply-row { display: flex; gap: .5rem; align-items: flex-end; }
.reply { min-height: 2.5rem; height: 2.5rem; max-height: 12rem; resize: none; font-size: .95rem; padding: .5rem .7rem; overflow-y: auto; }
.reply-row button { flex: none; }
.fbform textarea { min-height: 4rem; }

.scard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; margin-bottom: .6rem; }
.scard-q { margin: .4rem 0; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty { text-align: center; background: #fff; border: 1px dashed #cfcbbf; border-radius: var(--radius); padding: 2rem 1rem; }
.empty.small { padding: 1rem; }
.empty-icon { font-size: 2rem; color: var(--gold); }

/* ---------- תנועה רכה: בלי קפיצות ---------- */
#feed .section-head, .conv, .searchbox { scroll-margin-top: 1rem; }
#feed { min-height: 55vh; transition: opacity .15s ease, min-height .35s ease; }
#feed.busy { opacity: .55; pointer-events: none; }
.conv, .scard, .bubble { transition: opacity .2s ease, transform .2s ease, box-shadow .25s ease; }
.conv.enter { animation: rise .28s ease both; }
.conv.enter:nth-of-type(2) { animation-delay: .04s; } .conv.enter:nth-of-type(3) { animation-delay: .08s; } .conv.enter:nth-of-type(n+4) { animation-delay: .12s; }
.leaving { opacity: 0; transform: scale(.98); pointer-events: none; }
.bubble.sending { opacity: .6; }
.flash { animation: flash 1.1s ease; }
.conv.flash, .section-head.flash { border-radius: var(--radius); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(184,137,43,0); } 25% { box-shadow: 0 0 0 4px rgba(184,137,43,.45); } }
.stat, .seg, .ctab, button, .btn { transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.stat:active, .seg:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* תמונת פרופיל, קישורים בפרופיל, ועל המיזם */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xs { width: 1.6rem; height: 1.6rem; font-size: .8rem; vertical-align: middle; margin-inline-end: .4rem; }
.avatar.xl { width: 5.5rem; height: 5.5rem; font-size: 2.2rem; }
.photofield { display: flex; align-items: center; gap: 1rem; }
.linkchips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.linkchip { display: inline-flex; align-items: center; gap: .2rem; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .65rem; font-size: .82rem; color: var(--navy); background: #fff; text-decoration: none; }
.linkchip:hover, .linkchip:focus-visible { border-color: var(--gold); background: var(--gold-soft); }
.about { margin-top: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; background: #fbfaf6; }
.about h2 { font-size: 1rem; margin: 0 0 .25rem; }
.about p { margin: 0; color: #555; font-size: .95rem; }
.about-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.about textarea { margin-top: .75rem; }

/* דף הכניסה: דוגמאות לחיפוש */
.hero-examples { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.hero-examples li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; color: var(--navy-2); }
/* דף הכניסה במחשב: המסר מצד אחד והכניסה מהצד השני, הכול במסך אחד */
@media (min-width: 900px) {
  .wrap.landing { max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "intro login" "join login"; column-gap: 3.5rem; align-content: center; align-items: start; padding-top: 3rem; }
  .landing .hero { grid-area: intro; text-align: start; padding: 1.5rem 0 1rem; }
  .landing .hero h1 { font-size: 2.5rem; line-height: 1.2; }
  .landing .hero p { font-size: 1.1rem; }
  .landing .hero-examples { justify-content: flex-start; }
  .landing .hero-examples li { font-size: .95rem; padding: .35rem .95rem; }
  .landing .login-card { grid-area: login; margin: 0; }
  .landing .join-card { grid-area: join; text-align: start; background: transparent; border: none; box-shadow: none; padding: 1rem 0 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 1rem; }
}

/* תפריט המשתמש בסרגל העליון */
.usermenu { position: relative; }
.topbar .menu-btn { display: inline-flex; align-items: center; gap: .1rem; padding: .25rem .7rem .25rem .5rem; border-radius: 999px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); font-weight: 600; max-width: 62vw; }
.topbar .menu-btn:hover, .topbar .menu-btn[aria-expanded=true] { background: rgba(255,255,255,.18); }
.menu-btn .avatar { background: #e7c873; color: var(--navy); }
.menu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn .caret { font-size: .7rem; opacity: .8; margin-inline-start: .35rem; }
.menu-pop { position: absolute; inset-block-start: calc(100% + .5rem); inset-inline-end: 0; z-index: 30; min-width: 15rem; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20,33,61,.22); padding: .4rem; display: flex; flex-direction: column; }
.menu-head { display: flex; flex-direction: column; padding: .5rem .75rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; color: var(--navy); }
.menu-pop a, .topbar .menu-pop button { display: block; width: 100%; text-align: start; background: none; border: none; border-radius: 8px; padding: .55rem .75rem; color: var(--text); font: inherit; font-weight: 400; text-decoration: none; white-space: nowrap; cursor: pointer; }
.menu-pop a:hover, .topbar .menu-pop button:hover, .menu-pop a:focus-visible, .topbar .menu-pop button:focus-visible { background: #f3f1ea; }
.menu-pop hr { border: none; border-top: 1px solid var(--line); margin: .3rem 0; width: 100%; }
.topbar .menu-pop button.danger-text { color: var(--bad); font-weight: 600; }

/* על המיזם: שורה אחת צנועה */
.about { margin-top: 1rem; padding: .7rem 1rem; }
.about p { font-size: .9rem; }

/* מחשב: הכול מול העיניים בלי גלילת עמוד. חיפוש בצד אחד, פניות ותגובות בצד השני, וכל צד נגלל בתוך עצמו. */
@media (min-width: 1024px) and (min-height: 620px) {
  body.dashpage { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  .dash { flex: 1; min-height: 0; width: 100%; max-width: 1280px; display: flex; flex-direction: column; padding: 1rem 1.5rem; }
  .dash .dhero { flex: none; min-height: 0; padding: .9rem 1.5rem; margin-bottom: 1rem; }
  .dash .dhero h1 { font-size: 1.45rem; margin: 0; }
  .dash .dhero p { display: none; }
  .dash .tile { min-height: 0; padding: .5rem .9rem; flex-direction: row; align-items: center; gap: .6rem; }
  .dash .tile-num { font-size: 1.5rem; }
  .dash-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; }
  .dash-main.solo { grid-template-columns: minmax(0, 1fr); }
  .dash-main > * { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-inline-end: .35rem; scrollbar-width: thin; }
  .dash-main.feed-first #feed { order: 0; margin-bottom: 0; }
  #feed { min-height: 0 !important; }
  #feed .section-head { position: sticky; inset-block-start: 0; z-index: 2; background: var(--bg); margin: 0; padding: .1rem 0 .6rem; }
  .dash .searchbox { margin-bottom: .75rem; }
  .dash .searchbox textarea { min-height: 4rem; }
  .dash .about { flex: none; margin-top: .75rem; }
  .dash .empty { padding-block: 1.5rem; }
}

/* תנאי שימוש ומדיניות פרטיות */
.legal { padding: 1.75rem 2rem; line-height: 1.75; }
.legal h2 { margin-top: 2rem; padding-bottom: .4rem; border-bottom: 2px solid var(--gold); scroll-margin-top: 1rem; }
.legal h3 { margin-top: 1.5rem; scroll-margin-top: 1rem; }
.legal-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.legal-nav a { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .85rem; font-size: .88rem; text-decoration: none; background: #fbfaf6; }
.legal-nav a:hover { border-color: var(--gold); }
.clauses { list-style: none; margin: 0; padding: 0; }
.clauses li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .25rem; margin-bottom: .55rem; }
.clauses .cn { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; padding-top: .1rem; }
@media (max-width: 560px) { .legal { padding: 1.25rem 1rem; } .clauses li { grid-template-columns: 2.2rem minmax(0, 1fr); } }
@media print { .topbar, .legal-nav { display: none; } .card { box-shadow: none; border: none; } }

/* פניות שקיבלתי / פניות ששלחתי: שתי רשימות נפרדות וברורות */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.side { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: start; background: #fff; color: var(--muted); border: 1px solid var(--line); border-bottom: 4px solid var(--line); border-radius: 12px; padding: .6rem .8rem; font-weight: 400; min-width: 0; }
.side:hover { background: #fbfaf6; }
.side-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.side-label { font-weight: 700; font-size: 1rem; color: var(--navy); }
.side-arrow { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-weight: 700; font-size: .9rem; color: #fff; background: var(--navy-2); }
.side.in .side-arrow { background: var(--gold); }
.side-hint { font-size: .78rem; line-height: 1.3; }
.side.on { border-color: var(--navy-2); border-bottom-color: var(--navy-2); background: #f3f5fa; box-shadow: var(--shadow); }
.side.in.on { border-color: var(--gold); border-bottom-color: var(--gold); background: #fbf6e8; }
.side.on .count { background: var(--navy); color: #fff; }
.dir { font-size: .78rem; font-weight: 700; letter-spacing: .2px; color: var(--navy-2); margin-bottom: .1rem; }
.dir.in { color: #8a6412; }

/* על המיזם: מודגש, לא שורת חובה */
.about { margin-top: 1.5rem; padding: 1.25rem 1.5rem; border: 1px solid #e6d5a8; border-inline-start: 6px solid var(--gold); background: linear-gradient(135deg, #fffaf0, #fbf3dc); box-shadow: var(--shadow); }
.about h2 { font-size: 1.25rem; margin: 0 0 .3rem; color: var(--navy); }
.about p { font-size: 1.02rem; line-height: 1.6; color: #3d3a33; margin: 0; }
.about-row { align-items: center; gap: 1.1rem; }
.about-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--navy); color: #e7c873; font-size: 1.6rem; }
.about-cta { flex: none; background: var(--navy); color: #fff; border: none; border-radius: 10px; padding: .7rem 1.2rem; font-weight: 700; font-size: 1rem; }
.about-cta:hover { background: var(--navy-2); }
@media (max-width: 700px) { .about-row { flex-direction: column; align-items: flex-start; } .about-cta { width: 100%; } }
@media (min-width: 1024px) and (min-height: 620px) { .dash .about { margin-top: 1rem; padding: .9rem 1.5rem; } .dash .about h2 { font-size: 1.15rem; } .dash .about p { font-size: .98rem; line-height: 1.45; } }
/* בקשה לדיוק החיפוש */
.refine { border-inline-start: 4px solid var(--gold); }
.refine h3 { margin-top: 0; }
.refine ul { margin: .4rem 0 0; padding-inline-start: 1.2rem; }

/* כישורים נוספים בפרופיל */
.field.tight { margin: .6rem 0 0; }
.tag.gold { background: #fbf3dc; color: #7a5a10; border: 1px solid #e6d5a8; }

/* אחרי חיפוש: הדוגמאות מוסתרות, כדי שהתוצאות יופיעו מיד מתחת לתיבה */
.searchbox.searched .examples, .searchbox.searched .ex-label { display: none; }

/* התאמה חלקית: מתאים לבקשה אבל לא לאזור */
.msg.warn { background: #fdf0e3; color: #8a4b0f; border: 1px solid #f1d3b0; }
.reasons li.caveat { color: #a2540d; font-weight: 600; }
.reasons li.caveat::before { content: "!"; color: #a2540d; font-weight: 700; }

/* ===== תצוגת תיבת הודעות (עמוד משתמש חדש, בניסיון) ===== */
body.mailpage { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.mail { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.mail-list { display: flex; flex-direction: column; min-height: 0; background: #fff; border-inline-end: 1px solid var(--line); }
.pad { padding: 1rem; }
.newbtn { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .9rem .9rem .5rem; padding: .8rem 1rem; border: none; border-radius: 14px; background: var(--gold); color: #fff; font-size: 1.1rem; font-weight: 700; box-shadow: 0 4px 14px rgba(184,137,43,.35); }
.newbtn:hover, .newbtn.on { background: #a57a22; }
.newbtn .plus { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 1.5rem; line-height: 1; font-weight: 400; }
.mtabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 .5rem; }
.mtab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; background: none; border: none; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); font-weight: 600; padding: .7rem .3rem; white-space: nowrap; }
.mtab.on { color: var(--navy); border-bottom-color: var(--gold); }
.mtab .count { font-size: .75rem; }
.mitems { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mrow { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: start; background: none; border: none; border-bottom: 1px solid #f0eee7; border-radius: 0; padding: .7rem .9rem; color: var(--text); font-weight: 400; }
.mrow:hover { background: #faf9f5; }
.mrow.on { background: #f3f5fa; box-shadow: inset -4px 0 0 var(--navy-2); }
.mrow .avatar { flex: none; }
.mrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.mrow-top, .mrow-bottom { display: flex; align-items: center; gap: .4rem; }
.mrow-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--navy); }
.mrow-time { flex: none; font-size: .75rem; color: var(--muted); }
.mrow-preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .87rem; color: var(--muted); }
.mrow.unread .mrow-title { font-weight: 800; } .mrow.unread .mrow-preview { color: var(--text); font-weight: 600; }
.mrow .dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--bad); }
.mrow .tag { flex: none; font-size: .7rem; }
.mrow.inline { border: 1px solid var(--line); border-radius: 10px; margin-top: .5rem; }
.avatar.search-ico { background: var(--gold-soft); color: var(--gold); font-size: 1.2rem; }
.mfoot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .9rem; border-top: 1px solid var(--line); background: #fbfaf6; }
.mrange { width: auto; padding: .15rem .4rem; font-size: .8rem; display: inline-block; }
.mail-view { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.vhead { flex: none; display: flex; align-items: center; gap: .7rem; padding: .7rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); }
.vhead h1 { font-size: 1.15rem; margin: 0; }
.vbody { flex: 1; min-height: 0; overflow-y: auto; padding: 1.25rem; }
.vbody > * { max-width: 860px; margin-inline: auto; }
.vbody .card, .vbody .result { margin-bottom: 1rem; }
.composer h2 { margin-top: 0; }
.composer.searched .examples, .composer.searched .ex-label { display: none; }
.vempty { margin: auto; text-align: center; padding: 2rem; max-width: 26rem; }
.backbtn { display: none; flex: none; background: none; border: none; color: var(--navy); font-size: 1.4rem; padding: .1rem .5rem; }
.cv-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .5rem 1.25rem; background: #fbfaf6; border-bottom: 1px solid var(--line); }
.cv-tools:empty { display: none; } .cv-tools .linkchips { margin-top: 0; }
.cv-fb { margin-inline-start: auto; } .cv-fb .fbform { margin: 0; min-width: min(24rem, 80vw); }
.cv-thread { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 1rem 1.25rem; background: #efece4; }
.cv-thread .bubble { max-width: min(75%, 34rem); background: #fff; box-shadow: 0 1px 1px rgba(20,33,61,.08); }
.cv-thread .bubble.mine { background: #dfe8f8; }
.day { align-self: center; background: rgba(255,255,255,.8); color: var(--muted); font-size: .75rem; border-radius: 999px; padding: .1rem .7rem; margin-bottom: .3rem; }
.cv-compose { flex: none; padding: .6rem 1.25rem .8rem; background: #fff; border-top: 1px solid var(--line); }
.sendbtn { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; padding: 0; background: var(--navy); color: #fff; border: none; font-size: 1.05rem; transform: scaleX(-1); }
.iconbtn.big { font-size: 1.05rem; padding: .35rem .5rem; }
.vhead + div:empty { display: none; }
.confirm { margin: .5rem 1.25rem; }
.fab { position: fixed; inset-block-end: 4.2rem; inset-inline-end: 1.25rem; z-index: 20; width: 3.6rem; height: 3.6rem; border-radius: 50%; border: none; background: var(--gold); color: #fff; font-size: 2.2rem; line-height: 1; font-weight: 400; padding: 0; box-shadow: 0 6px 18px rgba(20,33,61,.3); display: none; }
@media (max-width: 899px) {
  .mail { grid-template-columns: minmax(0, 1fr); }
  .mail-view { display: none; }
  body.viewing .mail-list { display: none; } body.viewing .mail-view { display: flex; }
  .backbtn { display: inline-block; }
  .newbtn { display: none; }
  .fab { display: block; } body.viewing .fab { display: none; } .fab.hidden { display: none; }
  .vhead, .cv-tools, .cv-thread, .cv-compose { padding-inline: .9rem; } .vbody { padding: .9rem; }
  .mitems { padding-bottom: 5rem; }
}
