[hidden] { display: none !important; }
:root {
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #17231e;
  --muted: #66736d;
  --border: #e2e8e5;
  --primary: #0B6B4F;
  --primary-soft: #e6f3ed;
  --primary-text: #ffffff;
  --gold: #E0A000;
  --pos: #12805c;
  --neg: #c0392b;
  --highlight: #FFF6DB;
  --card-glass: rgba(255, 255, 255, 0.92);
  --hero-border: #EBD9A3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 30, 0.05), 0 4px 14px rgba(16, 40, 30, 0.05);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614;
    --card: #1a211e;
    --text: #e6ece9;
    --muted: #97a39d;
    --border: #2a3430;
    --primary: #4ADE9B;
    --primary-soft: #1d3329;
    --primary-text: #05261C;
    --pos: #3ccf91;
    --neg: #ff7a6b;
    --highlight: #352d19;
    --card-glass: rgba(26, 33, 30, 0.92);
    --hero-border: #5a4b22;
    --shadow: none;
  }
}
/* Heebo (OFL, public/fonts/HEEBO-OFL.txt), served from our own server. Without it Windows falls back to a bland Hebrew system font. */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/heebo-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/heebo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
#currencyNote:empty { display: none; }
body {
  margin: 0;
  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
h4 { font-size: 1rem; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
h5 { font-size: 0.8rem; color: var(--muted); margin: 10px 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- כותרת וניווט ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--card-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin: 0; white-space: nowrap; }
.brand img { border-radius: 22%; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav { display: flex; gap: 4px; margin-inline-start: 16px; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn.spinning .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lang-btn { font-size: 0.85rem; padding: 6px 12px; }

main { max-width: 1040px; margin: 18px auto; padding: 0 20px 40px; }
#loginScreen { margin: 0 auto; }
.view { display: flex; flex-direction: column; gap: 14px; }

/* ---------- רכיבים ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
button, input, select, textarea, .btn {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; min-height: 42px;
}
textarea { resize: vertical; width: 100%; }
input, select, textarea { width: 100%; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
button { cursor: pointer; }
button:disabled { opacity: 0.6; cursor: default; }
button.primary, .btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); font-weight: 600; }
button.danger { color: var(--neg); }
button.small, .small button { padding: 4px 10px; min-height: 32px; font-size: 0.85rem; }
.small { font-size: 0.85rem; }
.muted { color: var(--muted); }
.error { color: var(--neg); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row-btns, .btns { display: flex; gap: 8px; flex-wrap: wrap; }
label.row { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.busy { opacity: 0.6; pointer-events: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.banner { padding: 12px 16px; border-radius: 12px; margin: 0 0 12px; border: 1px solid var(--border); background: var(--card); }
.banner.ok { border-color: var(--pos); }
.banner.error { border-color: var(--neg); color: var(--neg); }
.badge { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; margin-inline-start: 6px; background: var(--highlight); }
.badge.error, .badge.reauth { color: var(--neg); }

.seg-btns { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
.seg-btns button { border: 0; background: transparent; min-height: 34px; padding: 5px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.seg-btns button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---------- סיכום ---------- */
.onboard { background: linear-gradient(135deg, var(--primary-soft), var(--card)); }
.onboard .btn { margin-top: 4px; }

.setup-dialog {
  width: min(460px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: clamp(16px, 5vw, 28px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}
.setup-dialog::backdrop { background: rgba(10, 20, 16, 0.58); }
.setup-progress { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.setup-progress p { margin: 0; white-space: nowrap; }
.setup-progress progress { flex: 1; min-width: 0; accent-color: var(--primary); }
.setup-dialog h2 { margin: 6px 0 0; font-size: 1.4rem; }
.setup-dialog h2:focus { outline: none; }
.setup-dialog fieldset { min-inline-size: 0; padding: 0; margin: 0; border: 0; }
.setup-dialog fieldset > p { margin: 0 0 12px; }
.setup-entry label { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-block: 6px; cursor: pointer; }
.setup-entry label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.setup-entry input { flex-shrink: 0; }
.setup-entry small { display: block; color: var(--muted); }
#setupError { margin: 0; }
#setupError:empty { display: none; }
.setup-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-block-start: 10px; }
.setup-actions button:first-child { margin-inline-end: auto; }
.period-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
.stats.two { grid-template-columns: 1fr 1fr; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); min-width: 0; }
.stat > span { color: var(--muted); font-size: 0.88rem; }
.stat b { font-size: 1.45rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-stat { background: var(--highlight); border-color: var(--hero-border); }
.hero-stat b { font-size: 1.9rem; }
.hero-stat b.ok { color: var(--pos); }
.hero-stat small { font-size: 0.8rem; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
tr.current td { background: var(--primary-soft); }
.table-wrap { overflow-x: auto; }

/* ---------- תנועות ---------- */
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar input { flex: 1 1 140px; width: auto; min-width: 0; }
.toolbar select { width: auto; flex: 0 0 auto; }
.app-btn { display: inline-flex; align-items: center; gap: 8px; }
.app-btn .app-ic { width: 18px; height: 18px; flex: none; }
.app-btn .app-emoji { flex: none; line-height: 1; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.amount-row { display: flex; gap: 6px; }
.amount-row select { width: 70px; flex-shrink: 0; }
.txlist { list-style: none; margin: 0; padding: 0; }
.tx { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); align-items: center; }
.tx-main { min-width: 0; flex: 1; border-inline-start: 3px solid transparent; padding-inline-start: 10px; }
.tx.t-income .tx-main { border-color: var(--pos); }
.tx.t-donation .tx-main { border-color: var(--gold); }
/* מנוכה מהמעשר: משפיע על החישוב (מוריד מההכנסות), ולכן לא מעומעם כמו הוצאה */
.tx.t-deduct .tx-main { border-color: var(--neg); }
.tx.t-ignore .tx-main, .tx.t-expense .tx-main { opacity: 0.7; }
.tx-desc { font-weight: 600; overflow-wrap: anywhere; }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tx-side b { font-variant-numeric: tabular-nums; }
.tx-side .tx-fx { margin-top: -3px; font-size: 0.72rem; line-height: 1.2; color: var(--muted); opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: help; }
.tx-side .tx-orig { margin-top: -1px; font-size: 0.7rem; line-height: 1.2; color: var(--muted); font-style: italic; white-space: nowrap; cursor: help; border-bottom: 1px dotted var(--muted); }
.tx-vis { display: inline-flex; gap: 2px; }
.icon-btn { border: 1px solid transparent; background: transparent; min-height: 28px; min-width: 28px; padding: 2px 6px; border-radius: 8px; line-height: 1; opacity: .7; }
.icon-btn:hover, .icon-btn:focus-visible { opacity: 1; border-color: var(--border); background: var(--bg); }
.tx.tx-hidden .tx-main, .tx.tx-deleted .tx-main { opacity: .5; }
.tx.tx-deleted .tx-desc { text-decoration: line-through; }
.tx-type { width: auto; min-height: 32px; padding: 3px 8px; font-size: 0.82rem; max-width: 170px; }
.empty { padding: 16px 0; }

/* ---------- הגדרות ---------- */
.settings-layout { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
.settings-menu { padding: 6px; display: flex; flex-direction: column; position: sticky; top: 80px; }
.settings-menu a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.settings-menu a small { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.settings-menu a:hover { background: var(--bg); }
.settings-menu a.active { background: var(--primary-soft); color: var(--primary); }
.back { display: none; text-decoration: none; font-weight: 600; margin-bottom: 8px; }
.form { max-width: 520px; }
.form label:not(.row) { display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
legend { font-weight: 700; padding: 0 6px; }
.row-checks { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: 0 0 16px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.conn-list { list-style: none; padding: 0; margin: 0 0 8px; }
.conn-list > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.conn-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; flex: 1 1 260px; }
.connect-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.connect-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; min-width: 0; }
.connect-card form { margin: 10px 0 6px; }
.connect-card input[type='file'] { padding: 8px; }
#scraperCard { grid-column: 1 / -1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; text-align: center; font-size: 0.85rem; line-height: 1.25; min-height: 96px; }
.tile:hover { border-color: var(--primary); background: var(--primary-soft); }
.chosen { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.login-guide { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--primary-soft); }
.login-guide summary { cursor: pointer; font-weight: 600; }
.login-guide ul { margin: 8px 0; padding-inline-start: 20px; line-height: 1.5; }
.login-guide li + li { margin-top: 4px; }
.login-guide p { margin: 6px 0 0; }
.logo { border-radius: 10px; object-fit: contain; background: #fff; flex-shrink: 0; }
.logo-md { width: 40px; height: 40px; }
.logo-sm, img.logo-sm { width: 26px; height: 26px; border-radius: 7px; }
.logo.mono { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.1rem; }
.seg { display: flex; gap: 14px; }
.seg label { display: flex; align-items: center; gap: 6px; }
.how summary { cursor: pointer; margin-top: 6px; }
.how p { margin: 6px 0 0; line-height: 1.6; }
.install .btn { margin: 4px 0 8px; }

/* ---------- בוט עזרה צף ---------- */
.help-fab {
  position: fixed; z-index: 35; bottom: calc(20px + var(--safe-b)); inset-inline-end: 20px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 16px;
  border-radius: 999px; border: 0; background: var(--primary); color: var(--primary-text); font-weight: 700;
  box-shadow: 0 6px 20px rgba(11, 78, 59, 0.35);
}
.help-fab .ic { width: 24px; height: 24px; }
.help-fab:hover { transform: translateY(-1px); }
.help-panel {
  position: fixed; z-index: 40; bottom: calc(20px + var(--safe-b)); inset-inline-end: 20px;
  width: min(400px, calc(100vw - 40px)); height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22); overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.help-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--primary-soft); border-bottom: 1px solid var(--border); }
.help-head img { border-radius: 22%; }
.help-head > div { flex: 1; line-height: 1.25; }
.help-head .icon-btn { border: 0; background: transparent; font-size: 1.1rem; min-width: 40px; }
.help-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; overflow-y: auto; }
.help-body .seg-btns { align-self: stretch; }
.help-body .seg-btns button { flex: 1; }
.help-body .chat { flex: 1; min-height: 0; }
.help-body .chat-log { flex: 1; min-height: 120px; max-height: none; }
.help-card { display: flex; flex-direction: column; gap: 12px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-log { display: flex; flex-direction: column; gap: 8px; min-height: 220px; max-height: 58vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; line-height: 1.55; }
.msg.model { background: var(--bg); align-self: flex-start; border-start-start-radius: 4px; }
.msg.user { background: var(--primary); color: var(--primary-text); align-self: flex-end; border-start-end-radius: 4px; }
.msg.error { color: var(--neg); }
.msg.typing::after { content: '● ● ●'; letter-spacing: 2px; opacity: .5; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .15; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { min-height: 34px; padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.chat-form { display: flex; gap: 8px; }
.chat-form button { flex-shrink: 0; }
.shot-row { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { cursor: pointer; }
.shot-preview { display: flex; align-items: flex-start; gap: 10px; }
.shot-preview img { max-width: 220px; max-height: 260px; border: 1px solid var(--border); border-radius: 10px; }

/* ---------- מובייל ---------- */
@media (max-width: 820px) {
  /* backdrop-filter יוצר containing block ושובר position:fixed של סרגל הניווט */
  .topbar { padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); backdrop-filter: none; background: var(--card); }
  .brand { font-size: 1.05rem; }
  .brand img { width: 28px; height: 28px; }
  .icon-btn .label { display: none; }
  .icon-btn { padding: 8px; min-width: 42px; justify-content: center; }
  body.is-app { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
  .nav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 30; margin: 0;
    height: calc(var(--nav-h) + var(--safe-b)); padding: 6px 6px var(--safe-b);
    background: var(--card); border-top: 1px solid var(--border);
    justify-content: space-around; gap: 0;
  }
  .nav a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 0.72rem; border-radius: 12px; justify-content: center; }
  .nav a .ic { width: 23px; height: 23px; }
  .nav a.active { background: transparent; }
  .nav a.active .ic { background: var(--primary-soft); border-radius: 999px; padding: 2px 12px; width: 50px; box-sizing: content-box; height: 22px; margin: -2px 0; }
  main { margin: 12px auto; padding: 0 12px 24px; }
  .card { padding: 14px; border-radius: 12px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats.two { grid-template-columns: 1fr 1fr; }
  .hero-stat { grid-column: 1 / -1; }
  .stat { padding: 10px; }
  .stat > span { font-size: 0.76rem; line-height: 1.3; min-height: 2em; }
  .stat b { font-size: 1.02rem; }
  .hero-stat b { font-size: 1.7rem; }
  .period-bar { justify-content: space-between; }
  th, td { padding: 8px 5px; font-size: 0.86rem; }
  .col-due, .col-c { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-menu { position: static; }
  .settings-menu a { padding: 14px 12px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .settings-menu a:last-child { border-bottom: 0; }
  .settings-menu a::after { content: '‹'; position: absolute; inset-inline-end: 16px; color: var(--muted); font-size: 1.3rem; }
  html[dir=ltr] .settings-menu a::after { content: '›'; }
  .settings-menu a { position: relative; }
  .settings-menu a.active { background: transparent; color: var(--text); }
  #view-settings.has-section .settings-menu { display: none; }
  .back { display: inline-block; }
  .connect-grid { grid-template-columns: 1fr; }
  /* חיבור חדש: בלי האנימציה (גרירה לסרגל סימניות היא פעולה של מחשב), כרטיסים צפופים */
  .bridge-demo { display: none; }
  .bridge-banks .bb > span { display: none; }
  .bridge-banks .bb .logo-sm { width: 28px; height: 28px; border-radius: 7px; }
  .connect-card { padding: 14px 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tile { flex-direction: row; justify-content: flex-start; min-height: 52px; padding: 6px 10px; gap: 10px; text-align: start; font-size: 0.85rem; }
  .tile .logo-md { width: 32px; height: 32px; border-radius: 8px; }
  .company-grid h5 { margin: 12px 0 6px; }
  .tx-type { max-width: 140px; }
  .help-fab { bottom: calc(var(--nav-h) + var(--safe-b) + 12px); inset-inline-end: 14px; min-height: 48px; padding: 0 14px; }
  .help-fab span { display: none; }
  .help-panel { inset: auto 0 0 0; width: 100%; height: calc(100dvh - 56px); border-radius: 18px 18px 0 0; padding-bottom: var(--safe-b); }
  body.help-open { overflow: hidden; }
  .msg { max-width: 92%; }
}
@media (max-width: 380px) {
  .lang-btn { padding: 6px 8px; }
}

/* ---------- התחברות ---------- */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.inline-form input { width: auto; flex: 1; }
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
  text-decoration: none;
}
.google-btn:hover { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
/* ---------- דף נחיתה ---------- */
.lang-btn { font-size: 0.85rem; padding: 6px 12px; }
body.is-landing {
  background: radial-gradient(1200px 700px at 25% 35%, #FFFDF5 0%, #F3FAF5 45%, #DDF0E4 100%) fixed;
}
body.is-landing .topbar { background: transparent; border-bottom: 0; }
.landing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 32px;
  min-height: calc(100vh - 90px);
}
.hero-title { text-wrap: balance; font-size: clamp(2rem, 3.9vw, 3.3rem); line-height: 1.1; margin: 0 0 18px; font-weight: 800; color: #0B4E3B; }
.hero-title span { white-space: nowrap; }
html[lang='en'] .hero-title span { white-space: normal; }
.hero-gold { background: linear-gradient(180deg, #FFD25C, #E0A000); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #2f5a4b; line-height: 1.6; margin: 0 0 28px; max-width: 560px; }
.landing .google-btn { font-size: 1.1rem; padding: 14px 24px; border-radius: 12px; box-shadow: 0 6px 20px rgba(11, 78, 59, 0.12); }
.landing #devLoginForm { margin-top: 12px; }
.trust { list-style: none; padding: 0; margin: 26px 0 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.trust li {
  font-size: 0.9rem;
  color: #0B4E3B;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #cfe5d8;
  border-radius: 999px;
  padding: 6px 14px;
}
.trust li::before { content: '✓ '; color: #E0A000; font-weight: 800; }
.landing-mark { display: flex; justify-content: center; }
.landing-mark img { width: min(100%, 540px); height: auto; }
@media (prefers-color-scheme: dark) {
  body.is-landing { background: radial-gradient(1200px 700px at 25% 35%, #1f2a24 0%, #141a17 60%, #0f1412 100%) fixed; }
  .hero-title { color: #E7F5EC; }
  .hero-sub { color: #b7d3c5; }
  .trust li { background: rgba(255, 255, 255, 0.06); border-color: #2c3d34; color: #cfe8db; }
}
@media (max-width: 820px) {
  .hero-title span { white-space: normal; }
  .landing { grid-template-columns: 1fr; text-align: center; padding: 8px 16px 40px; gap: 8px; min-height: 0; }
  .landing-mark { order: -1; }
  .landing-mark img { width: min(78vw, 340px); }
  .hero-sub { margin-inline: auto; }
  .trust { justify-content: center; }
}

/* ---------- גשר ייבוא מהדפדפן: חיבור בלי סיסמה ---------- */
.bridge-card { grid-column: 1 / -1; position: relative; }
.bridge-card h4 { margin: 6px 0 4px; }
.bridge-badge {
  display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--primary); color: var(--primary-text);
}
.bridge-lead { margin: 0 0 12px; line-height: 1.6; max-width: 70ch; }
.bridge-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .bridge-layout { grid-template-columns: 1fr; } }
.bridge-steps { margin: 0; padding: 0; list-style: none; counter-reset: bs; display: flex; flex-direction: column; gap: 8px; }
.bridge-steps li {
  counter-increment: bs; position: relative; padding: 10px 12px; padding-inline-start: 46px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--card); line-height: 1.5;
}
.bridge-steps li::before {
  content: counter(bs); position: absolute; inset-inline-start: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; background: var(--primary); color: var(--primary-text);
}
.bridge-steps li p { margin: 4px 0 0; }
.bridge-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.bridge-links .bm {
  display: inline-block; padding: 10px 22px; border-radius: 10px; text-decoration: none; cursor: grab;
  background: var(--primary); color: var(--primary-text); font-weight: 800; font-size: 1.05rem; white-space: nowrap;
  border: 2px dashed rgba(255, 255, 255, 0.6); animation: bm-pulse 2.4s ease-out infinite;
}
.bridge-links .bm:active { cursor: grabbing; }
@keyframes bm-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 12px transparent; }
}
.bridge-banks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; }
.bridge-banks .bb { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--muted); }
.bridge-banks .bb .logo-sm { width: 20px; height: 20px; border-radius: 5px; font-size: 0.7rem; }
.bridge-faq { margin-top: 12px; }
.bridge-faq summary { cursor: pointer; font-weight: 600; }
.bridge-faq dt { font-weight: 600; margin-top: 10px; }
.bridge-faq dd { margin: 2px 0 0; color: var(--muted); line-height: 1.6; }
#bridgeRotate { margin-top: 12px; }
.bridge-hint { margin: 4px 0 10px; }
.bridge-hint a { font-weight: 600; color: var(--primary); text-decoration: none; }
.bridge-hint a:hover { text-decoration: underline; }

/* הדגמה מונפשת: גרירת הכפתור → כניסה לבנק → לחיצה → התנועות עוברות */
.bridge-demo { direction: ltr; }
.bd-window {
  position: relative; height: 230px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background: var(--card); box-shadow: var(--shadow); font-size: 12px;
}
.bd-top { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; background: color-mix(in srgb, var(--border) 60%, var(--card)); }
.bd-top i { width: 9px; height: 9px; border-radius: 50%; background: #e0605a; }
.bd-top i:nth-child(2) { background: #e6b84a; }
.bd-top i:nth-child(3) { background: #5bbf5a; }
.bd-url { flex: 1; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; background: var(--card); color: var(--muted); direction: rtl; text-align: right; white-space: nowrap; overflow: hidden; }
.bd-bookmarks { height: 24px; border-bottom: 1px solid var(--border); padding: 0 10px; display: flex; justify-content: flex-end; align-items: center; }
.bd-mark, .bd-chip {
  display: inline-block; padding: 2px 9px; border-radius: 6px; font-weight: 700; font-size: 11px;
  background: var(--primary); color: var(--primary-text); white-space: nowrap;
}
.bd-mark { opacity: 0; animation: bd-mark 10s infinite; }
.bd-chip { position: absolute; right: 10px; top: 32px; animation: bd-chip 10s infinite; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.bd-page { position: relative; padding: 10px 14px; direction: rtl; }
.bd-bank { font-weight: 700; margin-bottom: 8px; opacity: 0; animation: bd-in 10s infinite; animation-delay: 0s; --t: 19%; }
.bd-row { height: 10px; border-radius: 4px; margin: 7px 0; background: color-mix(in srgb, var(--muted) 22%, transparent); opacity: 0; animation: bd-row 10s infinite; }
.bd-row:nth-of-type(3) { animation-name: bd-row2; }
.bd-row:nth-of-type(4) { animation-name: bd-row3; }
.bd-row.short { width: 60%; animation-name: bd-row4; }
.bd-panel {
  position: absolute; left: 10px; bottom: -86px; width: 150px; padding: 8px 10px; border-radius: 10px; text-align: right;
  background: var(--card); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: flex; flex-direction: column; gap: 3px; opacity: 0; animation: bd-panel 10s infinite;
}
.bd-panel span { font-size: 11px; }
.bd-reading { animation: bd-reading 10s infinite; }
.bd-done { color: var(--pos); font-weight: 700; position: absolute; top: 26px; right: 10px; opacity: 0; animation: bd-done 10s infinite; }
.bd-bar { height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--primary) 18%, transparent); overflow: hidden; margin-top: 2px; }
.bd-bar i { display: block; height: 100%; width: 0; background: var(--primary); animation: bd-bar 10s infinite; }
.bd-cursor {
  position: absolute; right: 18px; top: 44px; width: 16px; height: 22px; background: #111; z-index: 3;
  clip-path: polygon(0 0, 0 78%, 26% 60%, 44% 100%, 58% 94%, 40% 56%, 72% 56%);
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); animation: bd-cursor 10s infinite;
}
@keyframes bd-chip {
  0% { transform: translate(-150px, 150px); opacity: 0; }
  4% { transform: translate(-150px, 150px); opacity: 1; }
  15% { transform: translate(0, -8px); opacity: 1; }
  17%, 100% { transform: translate(0, -8px); opacity: 0; }
}
@keyframes bd-mark { 0%, 16% { opacity: 0; } 17%, 100% { opacity: 1; } }
@keyframes bd-cursor {
  0%, 4% { transform: translate(-140px, 160px); }
  15% { transform: translate(10px, 4px); }
  22% { transform: translate(-120px, 90px); }
  38% { transform: translate(-120px, 90px); }
  46% { transform: translate(6px, -12px) scale(1); }
  48% { transform: translate(6px, -12px) scale(0.8); }
  50% { transform: translate(6px, -12px) scale(1); }
  60%, 100% { transform: translate(-60px, 150px); }
}
@keyframes bd-in { 0%, 19% { opacity: 0; } 22%, 100% { opacity: 1; } }
@keyframes bd-row { 0%, 22% { opacity: 0; } 25%, 100% { opacity: 1; } }
@keyframes bd-row2 { 0%, 25% { opacity: 0; } 28%, 100% { opacity: 1; } }
@keyframes bd-row3 { 0%, 28% { opacity: 0; } 31%, 100% { opacity: 1; } }
@keyframes bd-row4 { 0%, 31% { opacity: 0; } 34%, 100% { opacity: 1; } }
@keyframes bd-panel { 0%, 50% { opacity: 0; transform: translateY(0); } 53%, 97% { opacity: 1; transform: translateY(-96px); } 100% { opacity: 0; transform: translateY(-96px); } }
@keyframes bd-bar { 0%, 53% { width: 0; } 82%, 100% { width: 100%; } }
@keyframes bd-reading { 0%, 83% { opacity: 1; } 85%, 100% { opacity: 0; } }
@keyframes bd-done { 0%, 84% { opacity: 0; } 86%, 100% { opacity: 1; } }
/* השלב הפעיל בהדגמה מודגש גם ברשימה */
.bridge-steps .bs-1 { animation: bs-1 10s infinite; }
.bridge-steps .bs-2 { animation: bs-2 10s infinite; }
.bridge-steps .bs-3 { animation: bs-3 10s infinite; }
@keyframes bs-1 { 0%, 17% { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); } 19%, 100% { border-color: var(--border); box-shadow: none; } }
@keyframes bs-2 { 0%, 18% { border-color: var(--border); box-shadow: none; } 20%, 40% { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); } 42%, 100% { border-color: var(--border); box-shadow: none; } }
@keyframes bs-3 { 0%, 41% { border-color: var(--border); box-shadow: none; } 43%, 98% { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); } 100% { border-color: var(--border); box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  .bridge-links .bm, .bridge-steps li, .bd-window *, .bd-chip, .bd-cursor { animation: none !important; }
  .bd-chip, .bd-cursor, .bd-reading { display: none; }
  .bd-mark, .bd-bank, .bd-row, .bd-done { opacity: 1; }
  .bd-panel { opacity: 1; transform: translateY(-96px); }
  .bd-bar i { width: 100%; }
}

/* ---------- חומש קומפקטי ---------- */
.chomesh-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; display: block; }
.hero-stat .chomesh-sub { color: color-mix(in srgb, var(--text) 55%, transparent); }

/* ---------- סינון תנועות ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 14px; min-height: 36px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 0.88rem; }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.cat-filter { max-width: 240px; }

/* ---------- תנועה: בחירה וקטגוריה ---------- */
.tx.sel { background: var(--primary-soft); border-radius: 10px; }
.tx-sel { flex-shrink: 0; align-self: center; margin-inline-end: 4px; }
.tx-cat-row { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.ss-trigger.tx-cat .ss-label { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.tx-pick { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.auto-badge { flex-shrink: 0; font-size: 0.68rem; font-weight: 600; line-height: 1; padding: 3px 6px; border-radius: 999px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.tx-cat { max-width: min(220px, 100%); min-height: 30px; padding: 3px 8px; font-size: 0.8rem; color: var(--muted); border-style: dashed; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 10px; }
.bulk-bar span { font-weight: 600; flex: 1; }

/* ---------- ניתוח הוצאות ---------- */
#anBody { display: flex; flex-direction: column; gap: 12px; }
.an-row { display: flex; flex-direction: column; gap: 5px; }
.an-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 0.92rem; }
.an-head > span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.an-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.an-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-bar { background: var(--bg); border-radius: 6px; height: 10px; overflow: hidden; }
.an-bar > div { height: 100%; border-radius: 6px; min-width: 3px; transition: width .3s; }

/* ---------- היסטוריית שליפות ---------- */
.link-btn { background: none; border: 0; padding: 2px 0; min-height: 0; color: var(--primary); text-decoration: underline; cursor: pointer; }
.history { margin-top: 6px; }
.hist-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hist-list li { display: flex; flex-direction: column; gap: 1px; padding: 5px 8px; border-radius: 8px; background: var(--bg); border-inline-start: 3px solid var(--border); }
.hist-list li.hist-ok { border-color: var(--pos); }
.hist-list li.hist-error, .hist-list li.hist-reauth { border-color: var(--neg); }

/* ---------- חיבורים: כרטיסים ומתגים ---------- */
.conn-list > li.conn { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 0; }
/* שורת כותרת: לוגו · שם ופרטים · פעולה עיקרית + תפריט ⋯ */
.conn-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; min-width: 0; }
.conn-info { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conn-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; line-height: 1.3; }
.conn-name b { overflow-wrap: anywhere; }
.conn-meta { display: flex; flex-wrap: wrap; line-height: 1.45; }
.conn-meta span { white-space: nowrap; }
.conn-meta span:not(:last-child)::after { content: '·'; margin: 0 6px; }
.conn-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-inline-start: auto; }
.conn-actions > button { min-height: 38px; padding: 6px 14px; white-space: nowrap; }
.conn-error { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--bg); }
.conn-empty { margin: 0; }
li.conn.st-reauth .conn-error, li.conn.st-error .conn-error { border-inline-start: 3px solid var(--neg); }
/* תפריט פעולות נוספות */
.conn-more { position: relative; }
.conn-more > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--muted); user-select: none; }
.conn-more > summary::-webkit-details-marker { display: none; }
.conn-more[open] > summary, .conn-more > summary:hover { background: var(--bg); color: var(--text); }
.conn-more:not([open]) .conn-menu { display: none; }
.conn-menu { position: absolute; z-index: 20; top: calc(100% + 4px); inset-inline-end: 0; min-width: 190px; display: flex; flex-direction: column; padding: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.3); }
.conn-menu { min-width: 230px; }
.conn-menu button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; text-align: start; border: 0; background: transparent; min-height: 42px; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.conn-menu button small { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.conn-menu button:hover { background: var(--bg); }
.conn-menu button.danger { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }
.conn-menu button:only-child.danger { border-top: 0; margin-top: 0; border-radius: 8px; }
/* שורה תחתונה: תזמון + היסטוריה, צמודים */
.conn-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; }
.conn-foot .link-btn { min-height: 28px; }
.conn-list .acct { padding: 4px 10px; min-height: 36px; }
.conn-list .acct-collapse > summary { padding: 4px 0; }
.conn-foot .link-btn { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.conn-foot .link-btn:hover { color: var(--primary); text-decoration: underline; }
.conn-schedule > summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.conn-schedule[open] { flex-basis: 100%; order: 1; }
.conn-schedule[open] > summary { color: var(--text); margin-bottom: 6px; }
.conn-schedule form { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 0; }
.conn-schedule form p { margin: 0; }
#acctHint { margin: 2px 0 14px; font-size: 0.78rem; }
/* כפתור "חיבור חדש" בראש העמוד + חלון (bottom sheet בנייד, חלון באמצע במחשב) */
.sec-head .add-conn-btn { margin-inline-start: auto; min-height: 38px; padding: 6px 14px; white-space: nowrap; }
.sec-head .add-conn-btn + .tour-btn { margin-inline-start: 0; }
.sec-head .sync-all-btn { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; white-space: nowrap; }
.sec-head .sync-all-btn:not([hidden]) + .add-conn-btn { margin-inline-start: 0; }
.sync-all-btn.spinning .ic { animation: spin 1s linear infinite; }
#sec-banks .sec-head { flex-wrap: wrap; }
@media (max-width: 560px) {
  /* בטלפון: "רענון כל החשבונות" בשורה משלו מתחת לכותרת */
  .sec-head .sync-all-btn { order: 1; flex-basis: 100%; justify-content: center; margin-inline-start: 0; }
  .sec-head .sync-all-btn:not([hidden]) + .add-conn-btn { margin-inline-start: auto; }
}
.sec-head .add-conn-btn > span[aria-hidden] { font-size: 1.15rem; line-height: 1; font-weight: 700; }
#addConnInline > h3 { margin: 18px 0 10px; }
#addConnBody > p.small { font-size: 0.78rem; }
.sheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 20, 16, 0.5); animation: sheet-fade .18s ease; }
.sheet[hidden] { display: none; }
.sheet-panel { width: 100%; max-width: 760px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--card); color: var(--text); border-radius: 20px 20px 0 0; padding: 0 16px calc(16px + var(--safe-b, 0px)); box-shadow: 0 -10px 40px -12px rgba(0, 0, 0, 0.35); animation: sheet-up .24s cubic-bezier(.2, .8, .2, 1); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 0 12px; background: var(--card); }
.sheet-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border); }
.sheet-head h3 { margin: 0; font-size: 1.15rem; }
.sheet-x { width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.sheet-x::before { content: '✕'; font-size: 1rem; }
.sheet-x:hover { background: var(--bg); color: var(--text); }
#sheetBanner { margin: 0 0 10px; }
body.sheet-open { overflow: hidden; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-fade { from { background: rgba(10, 20, 16, 0); } }
@media (min-width: 821px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { border-radius: 18px; max-height: 88vh; padding: 0 22px 22px; animation-name: sheet-pop; }
  .sheet-head::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-panel { animation: none; } }
/* כרטיסי "חיבור חדש" מתקפלים: הכותרת היא ה-summary */
details.connect-card > summary { list-style: none; cursor: pointer; position: relative; padding-inline-end: 28px; }
details.connect-card > summary::-webkit-details-marker { display: none; }
details.connect-card > summary h4 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
details.connect-card > summary p { margin: 0; }
details.connect-card > summary::after { content: ''; position: absolute; inset-inline-end: 4px; top: 6px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.connect-card[open] > summary::after { transform: rotate(-135deg); top: 10px; }
details.connect-card[open] > summary { margin-bottom: 10px; }
details.connect-card:not([open]) > summary p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 821px) {
  /* במחשב הכרטיסים תמיד פתוחים – בלי חץ קיפול */
  details.connect-card > summary { cursor: default; pointer-events: none; padding-inline-end: 0; }
  details.connect-card > summary::after { display: none; }
}
.acct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.acct { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--bg); }
.acct.off { opacity: 0.55; }
.acct-name { flex: 1; min-width: 0; }
.acct-hint { margin: 2px 0 0; }
.selall { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
/* מתג הפעלה/כיבוי */
.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: .2s; cursor: pointer; }
.slider::before { content: ''; position: absolute; height: 18px; width: 18px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }
html[dir=rtl] .switch input:checked + .slider::before { transform: translateX(-16px); }

/* ---------- נקודת צבע ועימוד תנועות ---------- */
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 7px; vertical-align: middle; flex-shrink: 0; }
.tx-sentinel { list-style: none; text-align: center; color: var(--muted); font-size: 0.85rem; padding: 12px 0; }
.an-row { display: block; width: 100%; text-align: start; background: none; border: 0; padding: 4px; border-radius: 8px; cursor: pointer; }
.an-row:hover { background: var(--bg); }

/* ---------- השהיית כרטיס + צמצום רשימה ---------- */
.badge.paused { background: var(--border); color: var(--muted); }
.acct-collapse > summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.acct-collapse[open] > summary { margin-bottom: 6px; }

/* ---------- סיכום: סרגל תקופה וכרטיס חישוב ---------- */
.period-nav { display: inline-flex; align-items: center; gap: 6px; }
.period-nav button { min-height: 36px; min-width: 36px; padding: 0 10px; font-size: 1.2rem; line-height: 1; border-radius: 10px; }
html[dir=rtl] .period-nav button { transform: scaleX(-1); }
.period-nav b { min-width: 9ch; text-align: center; }
.calc-card { display: flex; flex-direction: column; gap: 12px; }
.hero-line { display: flex; flex-direction: column; background: var(--highlight); border: 1px solid var(--hero-border); border-radius: 12px; padding: 14px 16px; }
.hero-line > span { color: var(--muted); font-size: 0.9rem; }
.hero-line b { font-size: 1.8rem; line-height: 1.3; }
.hero-line b.ok, .calc b.ok { color: var(--pos); }
.hero-line b.owe, .calc b.owe { color: var(--neg); }
table.calc { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.calc th { text-align: end; font-size: 0.85rem; color: var(--muted); padding: 4px 8px; border: 0; }
table.calc td { padding: 8px; border-bottom: 1px solid var(--border); white-space: normal; }
table.calc td.num { text-align: end; white-space: nowrap; }
table.calc tr.sub td { color: var(--muted); font-size: 0.9rem; }
table.calc tr.total td { border-bottom: 0; border-top: 2px solid var(--border); font-weight: 700; }
.head-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover td { background: var(--bg); }
.ptable tbody tr.picked td { box-shadow: inset 0 0 0 9999px var(--primary-soft); font-weight: 600; }

/* ---------- תנועות: סינון מתקדם, מיון, גלילה במסגרת ---------- */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row input { flex: 1 1 160px; width: auto; min-width: 0; }
.filter-row select, .filter-row button { width: auto; flex: 0 0 auto; }
#advBtn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.adv-panel { background: var(--bg); border-radius: 12px; padding: 8px 12px 12px; }
.adv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 0.9rem; }
.adv-head .adv-x { opacity: .6; font-size: 0.95rem; min-width: 34px; min-height: 34px; justify-content: center; }
.adv-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.adv-dates { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; color: var(--muted); grid-column: span 2; }
.date-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: start; color: var(--muted); font-weight: 400; }
.date-btn svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }
.date-btn.set { color: var(--text); }
.adv-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.adv-foot button { min-width: 120px; border-radius: 999px; }
/* פתוח ודביק: לא יותר מגובה המסך, עם גלילה פנימית – כדי שתמיד אפשר להגיע ל"סיום" */
.tx-sticky.adv-open { max-height: calc(100dvh - var(--topbar-h, 64px) - var(--nav-h, 0px) - 8px); overflow-y: auto; overscroll-behavior: contain; }

/* מתג תצוגה עדין: תנועות / קטגוריות */
.tx-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.tx-meta #txSummary { flex: 1 1 auto; min-width: 0; }
.view-toggle { display: inline-flex; flex-shrink: 0; margin-inline-start: auto; border: 1px solid var(--border); border-radius: 999px; padding: 2px; gap: 2px; background: var(--card); }
.view-toggle button { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 2px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 600; line-height: 1; }
.view-toggle button svg { width: 14px; height: 14px; }
.view-toggle button.active { background: var(--primary-soft); color: var(--primary); }
.view-toggle button:hover:not(.active) { color: var(--text); }
.cats-view #txSort, .cats-view #txSort + .ss-trigger, .cats-view #selectAllWrap, .cats-view #bulkBar { display: none !important; }
.tx-cats { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.tx-cats.loading { opacity: .55; transition: opacity .15s; }
.tc-group { display: flex; flex-direction: column; gap: 4px; }
.tc-head { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; color: var(--muted); padding: 0 4px 2px; border-bottom: 1px solid var(--border); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.tc-head.t-income span:last-child { color: var(--pos); }
.tc-item .an-head > span:first-child::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; margin-inline-end: 2px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; }
[dir=rtl] .tc-item .an-head > span:first-child::before { transform: rotate(135deg); }
.tc-item.open .an-head > span:first-child::before { transform: rotate(45deg); }
.tc-item.open > .an-row { background: var(--bg); }
.tc-tx { margin: 2px 0 8px; padding-inline-start: 18px; border-inline-start: 2px solid var(--border); }
.tc-tx-list { list-style: none; margin: 0; padding: 0; }
.tc-tx-list > li.tx:last-child { border-bottom: 0; }
.tc-tx .tx-sel { display: none; } /* בחירה מרובה – רק בתצוגת הרשימה */
.tc-more { margin: 6px 4px 2px; min-height: 32px; border-radius: 999px; font-size: 0.8rem; }
.tc-loading { margin: 6px 4px; }

/* בחירת טווח תאריכים */
.dr { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; user-select: none; }
.dr-ends { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dr-end { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; min-width: 0; }
.dr-end small { color: var(--muted); font-size: 0.75rem; }
.dr-end b { font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-end.active { border-color: var(--primary); background: var(--primary-soft); }
.dr-end:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dr-x { position: absolute; inset-inline-end: 4px; top: 4px; min-height: 26px; min-width: 26px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 0.8rem; border-radius: 50%; }
.dr-x:hover { background: var(--bg); color: var(--text); }
.dr-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.dr-presets .chip { min-height: 30px; padding: 3px 12px; font-size: 0.8rem; }
.dr-nav { display: flex; align-items: center; justify-content: space-between; }
.dr-nav b { font-size: 0.95rem; }
.dr-arrow { min-height: 36px; min-width: 36px; padding: 0; border-radius: 50%; font-size: 1.3rem; line-height: 1; border-color: transparent; background: transparent; }
.dr-arrow:hover { background: var(--bg); }
[dir=rtl] .dr-arrow { transform: scaleX(-1); }
.dr-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.dr-wd span { font-size: 0.75rem; color: var(--muted); padding-bottom: 2px; }
.dr-day { min-height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 0.9rem; font-variant-numeric: tabular-nums; position: relative; }
.dr-day:hover { background: var(--bg); border-radius: 10px; }
.dr-day.today { font-weight: 800; color: var(--primary); }
.dr-day.in { background: var(--primary-soft); border-radius: 0; }
.dr-day.start, .dr-day.end { background: var(--primary); color: var(--primary-text); border-radius: 10px; font-weight: 700; }
.dr-hint { margin: 0; text-align: center; }
@media (max-width: 600px) {
  .adv-dates { grid-column: 1 / -1; }
}
.adv-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; color: var(--muted); }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.active-filters:empty { display: none; }
.ftag { min-height: 30px; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.ftag.clear { background: transparent; border-color: var(--border); color: var(--muted); }
/* הרשימה נגללת עם הדף (בלי מסגרת גלילה פנימית); אזור הסינון והסיכום נשאר דבוק מתחת לכותרת */
.tx-scroll { border-top: 1px solid var(--border); transition: opacity .15s; }
.tx-sticky {
  position: sticky; top: var(--topbar-h, 64px); z-index: 15;
  margin: -18px -18px 12px; padding: 14px 18px 8px;
  background: var(--card); border-radius: var(--radius) var(--radius) 0 0;
  max-height: calc(100dvh - var(--topbar-h, 64px) - var(--nav-h, 0px) - var(--safe-b));
  overflow-y: auto; overscroll-behavior: contain;
}
.tx-sticky.stuck { border-radius: 0; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.25); }
/* כשהאזור מתכווץ, Scroll Anchoring של הדפדפן מזיז את הגלילה כדי "לפצות" – וזה מחזיר את האזור למצב רגיל, וחוזר חלילה (ריצוד/קפיצה). במסך התנועות מבטלים אותו */
html:has(#view-tx:not([hidden])) { overflow-anchor: none; }
/* מצב מכווץ כשהאזור נדבק למעלה – יותר מקום לרשימה */
.tx-sticky, .tx-sticky .filters, .tx-sticky .filter-row > *, .tx-sticky .chip, #txSummary { transition: padding .15s ease, min-height .15s ease, gap .15s ease, font-size .15s ease; }
.tx-sticky.stuck { padding-top: 8px; padding-bottom: 6px; }
.tx-sticky.stuck .filters { gap: 6px; margin-bottom: 4px; }
.tx-sticky.stuck .filter-row > *, .tx-sticky.stuck .filter-row .ss-trigger { min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.tx-sticky.stuck .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tx-sticky.stuck .chip-row::-webkit-scrollbar { display: none; }
.tx-sticky.stuck .chip { flex-shrink: 0; min-height: 30px; padding: 3px 12px; font-size: 0.82rem; }
.tx-sticky.stuck #txSummary { font-size: 0.78rem; }
@media (prefers-reduced-motion: reduce) { .tx-sticky, .tx-sticky * { transition: none !important; } }
.tx-sticky .filters { margin-bottom: 8px; }
.tx-sticky .bulk-bar { margin-bottom: 6px; }
.tx-card { overflow: visible; }
.tx-scroll.loading { opacity: 0.55; }
#txSummary:empty { display: none; }
#txSummary { margin: 0; }

/* ---------- טעינה על שורת החיבור ---------- */
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
li.conn.syncing { background: var(--primary-soft); border-radius: 10px; }
@media (max-width: 820px) {
  .hero-line b { font-size: 1.5rem; }
  .col-diff { display: none; }
  .tx-sticky { margin: -14px -14px 10px; padding: 10px 14px 6px; border-radius: 12px 12px 0 0; }
}

/* ---------- התחברות Firebase ---------- */
.fb-login { display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 12px 0; }
.fb-login .google-btn { margin: 0; justify-content: center; width: 100%; }
.fb-login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }
.fb-login .or::before, .fb-login .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.fb-form { display: flex; flex-direction: column; gap: 8px; }
.fb-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#fbMsg:empty { display: none; }
@media (max-width: 820px) { .fb-login { margin-inline: auto; } }

/* טבלת התקופות בטלפון: צפופה יותר כדי שכל העמודות (כולל "מצב מצטבר") ייכנסו בלי גלילה הצידה */
@media (max-width: 480px) {
  .ptable th, .ptable td { padding: 9px 3px; font-size: 0.8rem; }
  .ptable th { font-size: 0.72rem; white-space: normal; vertical-align: bottom; }
}
@media (max-width: 380px) {
  .ptable th, .ptable td { padding: 8px 2px; font-size: 0.72rem; }
}

/* ---------- גישת תמיכה ---------- */
.support-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; margin: 0 0 12px; border-radius: 12px; border: 2px solid var(--gold); background: var(--highlight); font-weight: 600; }
.support-bar[hidden] { display: none; }
.support-box { border-top: 1px solid var(--border); margin: 16px 0; padding-top: 4px; }
.support-box select { max-width: 160px; }
.support-log { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.support-log li { border-inline-start: 3px solid var(--border); padding-inline-start: 10px; overflow-wrap: anywhere; }

/* אימות דו-שלבי */
.mfa-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 20, 16, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.mfa-card { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; }
.mfa-card h2 { margin-top: 0; }
.mfa-steps { padding-inline-start: 20px; margin: 8px 0; }
.mfa-qr { display: flex; justify-content: center; margin: 12px 0; }
.mfa-qr svg { width: 200px; height: 200px; background: #fff; border-radius: 8px; }
.mfa-secret { display: block; margin-top: 6px; padding: 8px; background: var(--bg); border-radius: 8px; word-break: break-all; font-size: 15px; letter-spacing: 1px; user-select: all; }
.mfa-form { display: flex; gap: 8px; margin: 12px 0 4px; }
.mfa-form input { flex: 1; min-width: 0; font-size: 20px; letter-spacing: 4px; text-align: center; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; list-style: none; padding: 12px; margin: 8px 0; background: var(--bg); border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; text-align: center; user-select: all; }
#mfaDone { width: 100%; margin-top: 8px; }

/* ---------- חלונות (במקום alert/confirm/prompt) ---------- */
body.ui-locked { overflow: hidden; }
.ui-backdrop { position: fixed; inset: 0; z-index: 10100; background: rgba(10, 20, 16, 0); display: flex; align-items: center; justify-content: center; padding: 16px; transition: background .16s ease; }
.ui-backdrop.open { background: rgba(10, 20, 16, 0.5); }
.ui-modal { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .16s ease, transform .16s ease; }
.ui-modal.wide { max-width: 560px; }
.ui-backdrop.open .ui-modal { opacity: 1; transform: none; }
.ui-modal-title { margin: 0 0 8px; font-size: 1.12rem; }
.ui-modal-msg { margin: 0 0 14px; white-space: pre-line; color: var(--text); overflow-wrap: anywhere; }
.ui-field { margin: 0 0 14px; }
.ui-err { color: var(--neg); margin-top: 6px; }
.ui-modal-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ui-modal-btns button { min-width: 96px; border-radius: 999px; font-weight: 600; }
.ui-modal-btns button.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.ui-modal .ui-hint { color: var(--muted); font-size: .85rem; margin: -6px 0 12px; }
/* גוף הודעת אדמין (HTML חופשי): עיצוב קריא לתגיות הנפוצות */
.announce-body { margin: 0 0 16px; color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.announce-body :first-child { margin-top: 0; }
.announce-body :last-child { margin-bottom: 0; }
.announce-body p { margin: 0 0 10px; }
.announce-body h1, .announce-body h2, .announce-body h3, .announce-body h4 { margin: 14px 0 8px; line-height: 1.3; }
.announce-body ul, .announce-body ol { margin: 0 0 10px; padding-inline-start: 1.4em; }
.announce-body li { margin: 2px 0; }
.announce-body a { color: var(--primary); }
.announce-body img { max-width: 100%; height: auto; border-radius: 10px; }
.announce-body table { border-collapse: collapse; width: 100%; }
.announce-body th, .announce-body td { border: 1px solid var(--border); padding: 6px 8px; text-align: start; }
.announce-body blockquote { margin: 0 0 10px; padding-inline-start: 12px; border-inline-start: 3px solid var(--border); color: var(--muted); }
.announce-body pre { background: var(--highlight); padding: 10px; border-radius: 10px; overflow-x: auto; }
.announce-body hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
@media (max-width: 600px) {
  .ui-backdrop { align-items: flex-end; padding: 0; }
  .ui-modal, .ui-modal.wide { max-width: none; border-radius: 20px 20px 0 0; border-bottom: 0; padding: 20px 18px calc(16px + var(--safe-b)); max-height: 92dvh; transform: translateY(40px); }
  .ui-modal-btns { flex-direction: column-reverse; }
  .ui-modal-btns button { width: 100%; min-height: 48px; }
}

/* ---------- בחירה עם חיפוש (במקום select) ---------- */
select.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%); }
.ss-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: start; font-weight: 500; transition: border-color .12s, box-shadow .12s; }
.ss-trigger .ss-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-trigger .ss-chev { flex-shrink: 0; color: var(--muted); transition: transform .15s; }
.ss-trigger.open .ss-chev { transform: rotate(180deg); }
.ss-trigger:hover:not(:disabled) { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.ss-trigger:focus-visible, .ss-trigger.open { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.ss-trigger.ss-placeholder .ss-label { color: var(--muted); }
.toolbar .ss-trigger, .filter-row .ss-trigger { width: auto; flex: 0 0 auto; }
.amount-row .ss-trigger { width: 76px; flex-shrink: 0; }
.support-box .ss-trigger { max-width: 160px; }
.ss-trigger.tx-type { width: auto; min-height: 32px; padding: 3px 8px; font-size: 0.82rem; max-width: 170px; }
.ss-trigger.tx-cat { width: auto; max-width: min(240px, 100%); min-width: 0; min-height: 30px; padding: 3px 8px; font-size: 0.8rem; color: var(--muted); border-style: dashed; }
@media (max-width: 820px) { .ss-trigger.tx-type { max-width: 140px; } }

.ss-layer { position: fixed; inset: 0; z-index: 10400; }
.ss-pop { position: fixed; display: flex; flex-direction: column; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden; }
.ss-search { padding: 8px; border-bottom: 1px solid var(--border); }
.ss-search input { min-height: 38px; padding: 7px 12px; border-radius: 10px; background: var(--bg); }
.ss-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; outline: none; overscroll-behavior: contain; }
.ss-group { font-size: .74rem; font-weight: 700; color: var(--muted); padding: 10px 10px 4px; text-transform: uppercase; letter-spacing: .02em; }
.ss-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 9px; cursor: pointer; overflow-wrap: anywhere; }
.ss-opt.active { background: var(--primary-soft); }
.ss-opt.selected { font-weight: 700; color: var(--primary); }
.ss-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.ss-opt.ss-create { color: var(--primary); font-weight: 600; border-top: 1px dashed var(--border); border-radius: 0 0 9px 9px; margin-top: 4px; }
.ss-check { flex-shrink: 0; }
.ss-empty { color: var(--muted); padding: 12px 10px; text-align: center; font-size: .9rem; }
.ss-layer.sheet { background: rgba(10, 20, 16, 0); transition: background .18s ease; }
.ss-layer.sheet.open { background: rgba(10, 20, 16, 0.45); }
.ss-layer.sheet .ss-pop { inset: auto 0 0 0; max-height: 78dvh; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: var(--safe-b); transform: translateY(100%); transition: transform .2s ease; }
.ss-layer.sheet.open .ss-pop { transform: none; }
.ss-layer.sheet .ss-opt { min-height: 48px; padding: 12px 14px; font-size: 1rem; }
.ss-layer.sheet .ss-search input { min-height: 44px; font-size: 16px; }
.ss-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 8px auto 2px; flex-shrink: 0; }
.ss-title { font-weight: 700; text-align: center; padding: 4px 16px 8px; }
@media (prefers-reduced-motion: reduce) { .ss-pop, .ui-modal, .ui-backdrop, .ss-layer { transition: none !important; } }

/* ---------- פיצול תנועה ---------- */
.tx-split-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tx-split-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: .85rem; }
.tx-split-list li.t-income { box-shadow: inset 3px 0 0 var(--pos); }
.tx-split-list li.t-donation { box-shadow: inset 3px 0 0 var(--gold); }
html[dir=rtl] .tx-split-list li.t-income { box-shadow: inset -3px 0 0 var(--pos); }
html[dir=rtl] .tx-split-list li.t-donation { box-shadow: inset -3px 0 0 var(--gold); }
.tx-split-list li.t-deduct { box-shadow: inset 3px 0 0 var(--neg); }
html[dir=rtl] .tx-split-list li.t-deduct { box-shadow: inset -3px 0 0 var(--neg); }
.tx-split-list .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.tx-split-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px; vertical-align: middle; }
.split-ed { display: grid; gap: 10px; margin-bottom: 12px; }
.split-ed .split-total { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); }
.split-row { display: grid; grid-template-columns: 110px 1fr 1fr 36px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.split-row input { min-height: 40px; font-variant-numeric: tabular-nums; }
.split-row .ss-trigger { min-height: 40px; }
.split-row .split-del { min-height: 36px; min-width: 36px; padding: 0; border-radius: 50%; }
.split-left { font-size: .88rem; font-weight: 600; }
.split-left.bad { color: var(--neg); }
.split-left.ok { color: var(--pos); }
@media (max-width: 600px) {
  .split-row { grid-template-columns: 1fr 36px; }
  .split-row .split-amt { grid-column: 1; }
  .split-row .split-del { grid-column: 2; grid-row: 1; }
  .split-row .split-type, .split-row .split-cat { grid-column: 1 / -1; }
}
.rule-ed label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.rule-ed .rule-count { font-size: .85rem; color: var(--muted); margin-top: 6px; min-height: 1.3em; }
.tx.has-split { flex-wrap: wrap; row-gap: 6px; }
.tx.has-split .tx-split-list { flex: 1 0 100%; margin: 0; padding-inline-start: 30px; cursor: pointer; }

/* ---------- הדרכות: כפתור "?" בכל אזור (המנוע עצמו נטען רק בלחיצה – tour.ts) ---------- */
.tour-btn {
  position: relative; flex: none; width: 30px; height: 30px; min-height: 0; padding: 0;
  border-radius: 50%; border: 1.5px solid var(--border); background: var(--card); color: var(--primary);
  font-weight: 800; font-size: .95rem; line-height: 1; cursor: pointer;
}
.tour-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.period-bar .tour-btn, .toolbar .tour-btn { margin-inline-start: auto; align-self: center; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.sec-head h2 { margin: 0; }
.tour-hint { box-shadow: 0 0 0 4px rgba(242, 178, 27, .45); }
.tour-hint::after {
  content: attr(data-hint); position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 25;
  white-space: nowrap; background: var(--primary); color: var(--primary-text); font-size: .8rem; font-weight: 700;
  padding: 6px 10px; border-radius: 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); pointer-events: none; animation: pop .2s ease-out;
}
#helpTours { display: flex; flex-direction: column; gap: 4px; }
.demo-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.demo-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.demo-item small { color: var(--muted); font-weight: 400; }

/* מסך צר: סרגל הכלים של התנועות קומפקטי – כפתורים קטנים, ייצוא כאייקון בלבד, הכול בשורה אחת */
@media (max-width: 600px) {
  .toolbar { gap: 6px; align-items: center; }
  .toolbar > button:not(.tour-btn) { min-height: 34px; padding: 4px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
  .toolbar .app-btn { gap: 0; padding: 4px 8px; min-width: 36px; justify-content: center; }
  .toolbar .app-btn > span:not(.app-emoji) { display: none; }
  .toolbar .app-btn .app-emoji { font-size: 1.05rem; }
  .toolbar .app-btn .app-ic { width: 20px; height: 20px; }
  .toolbar .selall { font-size: 0.82rem; }
  .tx-card > p.muted.small { font-size: 0.76rem; line-height: 1.45; margin-top: 0; }
  .view-toggle button { padding: 2px 8px; }
}

/* ===== סיכום: מאיפה נובע כל מספר ===== */
.mini-h { margin: 14px 0 6px; font-size: 0.82rem; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.calc-card .mini-h { margin: 2px 0 -4px; }
.hero-basis { margin-top: 6px; color: var(--muted); text-decoration: none; border-bottom: 1px dashed currentColor; align-self: flex-start; }
.hero-basis:hover { color: var(--primary); }
.calc-src { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 1px; }
.calc-src a { color: var(--primary); text-decoration: none; font-weight: 600; }
.calc-src a:hover { text-decoration: underline; }
.basis-card .card-head { margin-bottom: 2px; }
.basis-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.basis-src { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.basis-src:last-child { border-bottom: 0; }
.basis-src .logo-md { width: 34px; height: 34px; border-radius: 9px; }
.bs-manual { background: var(--primary-soft); color: var(--primary) !important; font-size: 1rem; }
.bs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bs-main b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-main small { color: var(--muted); font-size: 0.78rem; }
.bs-warn { color: var(--neg); font-weight: 600; }
.basis-src.bad { background: linear-gradient(to left, transparent, color-mix(in srgb, var(--neg) 6%, transparent)); }
.bs-count { flex-shrink: 0; font-size: 0.8rem; padding: 5px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); border: 0; font-weight: 600; cursor: pointer; white-space: nowrap; }
.bs-count:hover { filter: brightness(.96); }
.basis-empty { padding: 6px 0; }
.reason-bar { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; margin: 2px 0 8px; }
.reason-bar i { min-width: 4px; }
.rs-manual { background: #0B6B4F; }
.rs-rule { background: #4F6FB8; }
.rs-ai { background: #8E5BC0; }
.rs-default { background: #B7C2BD; }
@media (prefers-color-scheme: dark) {
  .rs-manual { background: #25A06D; } .rs-rule { background: #6D8BD6; } .rs-ai { background: #A783D6; } .rs-default { background: #55625C; }
}
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reason-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); cursor: pointer; color: var(--text); }
.reason-chip:hover { background: var(--bg); }
.rdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.basis-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--highlight); border: 1px solid var(--hero-border); font-size: 0.86rem; line-height: 1.5; }
.basis-note .link-btn { font-weight: 700; color: var(--primary); }
.basis-out { display: flex; flex-direction: column; }
.out-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: start; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 9px 2px; cursor: pointer; font-size: 0.9rem; color: var(--text); }
.out-row:hover { background: var(--bg); }
.out-row .muted { white-space: nowrap; font-variant-numeric: tabular-nums; }
.basis-out p { margin: 8px 0 0; }
.more-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.an-row.compact { padding: 6px 4px; }
.teaser-rest { display: inline-block; margin-top: 6px; text-decoration: none; }
.auto-badge.r-rule { color: #3a5aa3; border-color: #c9d4ee; background: #eef2fb; }
.auto-badge.r-default { color: #7a5b00; border-color: #ecdca8; background: #fdf6e1; }
@media (prefers-color-scheme: dark) {
  .auto-badge.r-rule { color: #a9bdf0; border-color: #33415f; background: #1d2536; }
  .auto-badge.r-default { color: #e7c86b; border-color: #4f4320; background: #2b2615; }
}

/* ===== ניתוח: מדדים ומגמה ===== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 2px; text-align: start; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); color: var(--text); font: inherit; min-width: 0; }
button.kpi { cursor: pointer; }
button.kpi:hover { border-color: var(--primary); }
.kpi-l { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-l::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--muted); }
.kpi b { font-size: 1.35rem; font-variant-numeric: tabular-nums; text-align: start; }
[dir=rtl] .kpi b { text-align: right; }
.kpi small { font-size: 0.78rem; color: var(--muted); min-height: 1.2em; }
.kpi.k-left { background: var(--primary-soft); border-color: transparent; }
.kpi.k-left .kpi-l::before { display: none; }
.kpi.k-left.neg b { color: var(--neg); }
:root { --s-income: #12805C; --s-expense: #4F6FB8; --s-donated: #C28400; }
@media (prefers-color-scheme: dark) { :root { --s-income: #25A06D; --s-expense: #6D8BD6; --s-donated: #B8860F; } }
.k-income .kpi-l::before, .s-income { background: var(--s-income); fill: var(--s-income); }
.k-expense .kpi-l::before, .s-expense { background: var(--s-expense); fill: var(--s-expense); }
.k-donation .kpi-l::before, .s-donated { background: var(--s-donated); fill: var(--s-donated); }
.trend-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i, .ttip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.trend { position: relative; width: 100%; overflow: hidden; }
.trend svg { display: block; }
.trend .tg { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.trend .tb { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.trend .tl, .trend .tx-l { fill: var(--muted); font-size: 11px; font-family: inherit; }
.trend .thit { fill: transparent; }
.trend .tgrp { cursor: pointer; outline: none; }
.trend .tgrp path { stroke: var(--card); stroke-width: 1; }
.trend .tgrp:hover .thit, .trend .tgrp:focus-visible .thit { fill: var(--bg); }
.trend .tgrp.picked .thit { fill: var(--primary-soft); }
.trend .tgrp.picked .tx-l { fill: var(--primary); font-weight: 700; }
.ttip { position: absolute; top: 0; z-index: 2; pointer-events: none; background: var(--card); border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,.12); border-radius: 10px; padding: 8px 10px; font-size: 0.8rem; display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.ttip span { display: flex; align-items: center; gap: 6px; }
.ttip bdi { margin-inline-start: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.trend-table-wrap { margin-top: 6px; }
.trend-table-wrap summary { cursor: pointer; color: var(--muted); }
@media (max-width: 820px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 1.15rem; }
}
.trend svg { direction: ltr; }
.bs-count.zero { background: var(--bg); color: var(--muted); font-weight: 500; }
.hero-basis { border-bottom: 0; text-decoration: underline dotted; text-underline-offset: 3px; }
.trend .tnet { font-size: 11px; font-weight: 700; font-family: inherit; }
.trend .tnet.pos { fill: var(--pos); }
.trend .tnet.neg { fill: var(--neg); }
.ttip .tt-net { border-top: 1px solid var(--border); padding-top: 3px; margin-top: 2px; }
.ttip .tt-net i { display: none; }
.out-row.dup span { color: var(--muted); font-size: 0.86rem; }
.out-row.dup span::first-letter { color: var(--pos); }

/* ===== תנועות: שורה נקייה – תיקון מהיר בשורה, וחלון מורחב לכל השאר ===== */
.tx { align-items: stretch; gap: 8px; padding: 12px 2px; }
.tx-main { display: flex; flex-direction: column; gap: 4px; }
.tx.t-ignore .tx-main, .tx.t-expense .tx-main { opacity: 1; }
.tx.t-expense .tx-main { border-color: var(--s-expense); }
.tx.t-ignore .tx-main { border-color: var(--border); }
.tx.t-ignore .tx-desc, .tx.t-ignore .tx-amt { color: var(--muted); }
.tx-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tx-amt { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tx-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tx-meta .tx-fx, .tx-meta .tx-orig { font-size: 0.72rem; color: var(--muted); }
.tx-meta .tx-orig { font-style: italic; border-bottom: 1px dotted var(--muted); cursor: help; }
.tx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.tx-chips .ss-trigger.tx-type, .tx-chips .ss-trigger.tx-cat, .tx-chip { width: auto; min-height: 30px; padding: 3px 10px; font-size: 0.8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); max-width: 190px; }
.tx-chips .ss-trigger.tx-type { font-weight: 700; background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--primary); }
.tx.t-donation .tx-chips .ss-trigger.tx-type { background: color-mix(in srgb, var(--gold) 14%, var(--card)); border-color: color-mix(in srgb, var(--gold) 40%, transparent); color: color-mix(in srgb, var(--gold) 70%, var(--text)); }
.tx.t-expense .tx-chips .ss-trigger.tx-type { background: color-mix(in srgb, var(--s-expense) 10%, var(--card)); border-color: color-mix(in srgb, var(--s-expense) 30%, transparent); color: var(--s-expense); }
.tx.t-deduct .tx-chips .ss-trigger.tx-type { background: color-mix(in srgb, var(--neg) 10%, var(--card)); border-color: color-mix(in srgb, var(--neg) 30%, transparent); color: var(--neg); }
.tx.t-ignore .tx-chips .ss-trigger.tx-type { background: var(--bg); color: var(--muted); border-color: var(--border); }
.tx-chips .ss-trigger.tx-cat { border-style: solid; color: var(--muted); }
.tx-chip.static { background: var(--bg); color: var(--muted); cursor: default; }
.tx-why { background: none; border: 0; padding: 2px 2px; font-size: 0.74rem; color: var(--muted); cursor: pointer; min-height: 28px; }
.tx-why:hover { color: var(--primary); text-decoration: underline; }
.tx-why.r-default { color: color-mix(in srgb, var(--gold) 75%, var(--text)); }
.tx-why.r-rule { color: var(--s-expense); }
.tx-more { flex-shrink: 0; align-self: center; width: 28px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--muted); opacity: .55; cursor: pointer; padding: 0; }
.tx-more:hover, .tx-more:focus-visible { opacity: 1; color: var(--primary); }
[dir=ltr] .tx-more svg { transform: scaleX(-1); }
.tx-warn { font-size: 0.78rem; color: color-mix(in srgb, var(--gold) 70%, var(--text)); background: var(--highlight); border-radius: 8px; padding: 5px 8px; margin-top: 2px; }
.tx-sel { display: none; }
body.tx-selecting .tx-sel { display: inline-block; }
#selModeBtn.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.tx-link { align-items: center; gap: 10px; padding: 8px 6px; margin: 4px 0; border: 1px dashed var(--border); border-radius: 12px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.tl-ic { color: var(--pos); font-weight: 800; flex-shrink: 0; width: 18px; text-align: center; }
.tl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 0.82rem; color: var(--muted); }
.tl-text b { color: var(--text); font-weight: 600; font-size: 0.86rem; }
.tx-context { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--primary-soft); border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; font-size: 0.88rem; font-weight: 600; }
.tx-context a { font-size: 0.82rem; color: var(--primary); text-decoration: none; white-space: nowrap; }
/* החלון המורחב */
.txs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.txs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.txs-head > div { display: flex; flex-direction: column; min-width: 0; }
.txs-title { font-size: 1.1rem; overflow-wrap: anywhere; }
.txs-amt { font-size: 1.4rem; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.txs-why { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.txs-why .mini-h { margin: 0 0 4px; display: block; }
.txs-why p { margin: 0 0 4px; line-height: 1.55; }
.txs .mini-h { margin: 4px 0 -4px; }
.txs-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.txs-type { min-height: 42px; border-radius: 10px; font-size: 0.86rem; }
.txs-type.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.txs-cat .ss-trigger { width: 100%; }
.txs-rule { align-self: flex-start; color: var(--primary); font-weight: 600; }
.txs-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.txs-actions button { flex: 1; min-height: 42px; border-radius: 10px; }
.txs-actions .danger-outline { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, var(--border)); }
.txs-src { margin: 0; }
/* "לזכור תמיד?" */
.rule-toast { position: fixed; z-index: 10050; inset-inline: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); max-width: 560px; margin-inline: auto; background: #17231e; color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 10px 28px rgba(0,0,0,.28); font-size: 0.9rem; animation: rt-in .2s ease; }
.rt-msg { flex: 1 1 200px; line-height: 1.4; }
.rt-btns { display: flex; gap: 6px; align-items: center; }
.rule-toast button { background: transparent; border: 0; color: #cfd8d3; padding: 6px 8px; font-size: 0.86rem; min-height: 36px; }
.rule-toast .rt-yes { background: #4ADE9B; color: #05261C; font-weight: 700; border-radius: 9px; padding: 6px 12px; }
.rule-toast .rt-more { text-decoration: underline; }
@media (min-width: 821px) { .rule-toast { bottom: 20px; } }
@keyframes rt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .rule-toast { animation: none; } }

/* ===== חשבונות ===== */
#view-accounts { max-width: 820px; width: 100%; margin-inline: auto; }
.acct-lead { margin: 0 0 6px; }
.conn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0 4px; }
.cs-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; background: var(--bg); border: 0; border-radius: 10px; padding: 7px 4px; font: inherit; color: var(--text); text-align: center; }
button.cs-cell { cursor: pointer; }
button.cs-cell:hover { background: var(--primary-soft); }
.cs-cell b { font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.cs-cell span { font-size: 0.72rem; color: var(--muted); }
/* יתרות: בבנקים / לחיוב באשראי */
.bal-summary { margin: 4px 0 10px; }
.bal-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.bal-cell { display: flex; flex-direction: column; gap: 2px; background: var(--primary-soft); border-radius: 12px; padding: 10px 12px; }
.bal-cell > span { font-size: 0.8rem; color: var(--muted); }
.bal-cell b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.bal-cell small { font-size: 0.75rem; color: var(--muted); }
.bal-summary > p { margin: 6px 0 0; }
.acct-bal { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: end; }
.acct-bal small { display: block; font-size: 0.72rem; color: var(--muted); }
@media (max-width: 380px) { .nav a { font-size: 0.66rem; } }

/* ===== משתמש חדש ===== */
body.is-fresh #view-home > .period-bar, body.is-fresh #view-home .calc-card, body.is-fresh #basisCard, body.is-fresh #spendTeaser, body.is-fresh #currencyNote { display: none !important; }
.onboard { display: flex; flex-direction: column; gap: 10px; }
.onboard h2 { margin: 0; }
.onboard > p { margin: 0; }
.ob-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.ob-steps li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ob-steps li:last-child { border-bottom: 0; }
.ob-steps li > div { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ob-n { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; border: 2px solid var(--border); color: var(--muted); }
.ob-steps li.done .ob-n { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.ob-steps li.now .ob-n { border-color: var(--primary); color: var(--primary); }
.ob-steps li:not(.done):not(.now) b { color: var(--muted); }
.ob-btn { align-self: stretch; text-align: center; margin: 4px 0 2px; }
.ob-preview { border: 1px dashed var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ob-preview .mini-h { margin: 0; }
.ob-ghost { opacity: .6; }
.ob-preview .link-btn { align-self: flex-start; color: var(--primary); font-weight: 600; }
@media (min-width: 821px) { .ob-btn { align-self: flex-start; padding-inline: 28px; } }

/* ===== הסברים ===== */
.how-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 0 -4px; }
.how-row .mini-h { margin: 0; }
.info-btn { background: var(--primary-soft); color: var(--primary); border: 0; border-radius: 999px; padding: 4px 10px; font-size: 0.78rem; font-weight: 700; min-height: 30px; cursor: pointer; white-space: nowrap; }
.info-btn:hover { filter: brightness(.96); }
.explain p { margin: 0 0 10px; line-height: 1.6; }
.how-ex { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.explain-more { color: var(--primary); font-weight: 700; text-decoration: none; }
#view-how { max-width: 720px; width: 100%; margin-inline: auto; gap: 10px; }
.how-head h2 { margin: 6px 0 2px; }
.how-head p { margin: 0 0 4px; }
.how-item { padding: 0; }
.how-item summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.how-item summary::-webkit-details-marker { display: none; }
.how-item summary::after { content: '▾'; color: var(--muted); transition: transform .15s; }
.how-item[open] summary::after { transform: rotate(180deg); }
.how-item[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.how-item > p { margin: 0 16px 12px; line-height: 1.65; }
.how-ask { align-self: flex-start; color: var(--primary); font-weight: 600; }
.help-how { display: block; margin-bottom: 8px; color: var(--primary); font-weight: 600; text-decoration: none; }
