:root {
  --bg: #F6F5F1; --card: #FFFFFF; --ink: #1C2430; --soft: #4A5260; --line: #E4E2DC;
  --teal: #0E6B5E; --teal-d: #09493F; --teal-l: #E3F1EE;
  --orange: #C2571A; --orange-l: #FBEBDD; --violet: #3F318F; --violet-l: #E8E6F4;
  --bad: #B3261E; --bad-l: #FBE4E2;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Rubik, system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
h1 { font-size: 28px; margin: 8px 0; }
h2 { font-size: 19px; margin: 0 0 12px; }
a { color: var(--teal); }
button, input, select { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.ic.lg { width: 30px; height: 30px; color: var(--teal); }

.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 20px; }
.narrow { max-width: 440px; margin: 0 auto; }
.lead { font-size: 18px; color: var(--soft); margin: 0; }
.note { font-size: 14px; color: var(--soft); margin: 0; }
.muted { color: var(--soft); font-size: 14px; }
.logo { width: 72px; height: 72px; border-radius: 22px; background: var(--teal); color: #fff; display: grid; place-items: center; }
.logo .ic { width: 40px; height: 40px; }

.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; text-align: start; }
.center-row { justify-content: center; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.card.soft { background: var(--teal-l); border-color: transparent; }
.card.center { padding: 30px 18px; }
.link-card { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--soft); flex: 1 1 140px; }
input, select { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; color: var(--ink); width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #1F6FB2; outline-offset: 2px; }
form.row > .btn { align-self: flex-end; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 15px; white-space: nowrap; }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); }
.btn.primary:disabled { background: #9FB8B3; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--teal-d); border: 1.5px solid var(--line); }
.btn.wa { background: #25D366; color: #fff; text-decoration: none; }
.btn.wa:hover { background: #1DA851; }
.btn.danger { background: var(--bad-l); color: var(--bad); }
.btn.big { min-height: 52px; font-size: 17px; width: 100%; max-width: 360px; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; font-size: 20px; }

.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #ECEAE4; color: var(--soft); text-decoration: none; }
.pill.warn { background: var(--orange-l); color: #8A3B0F; }
.pill.ok { background: var(--teal-l); color: var(--teal-d); font-size: 16px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.a { background: var(--orange-l); color: #8A3B0F; }
.tag.b { background: var(--violet-l); color: var(--violet); }

.avatar { width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 13px; }
.avatar.xl { width: 84px; height: 84px; font-size: 34px; }
.avatar.parent { background: var(--ink); }
.avatar.parent .ic { width: 34px; height: 34px; }
.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 10px 0 20px; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 14px; width: 140px; cursor: pointer; }
.profile:hover { border-color: var(--teal); }

/* מעטפת */
.shell { max-width: 1100px; margin: 0 auto; padding-bottom: 90px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; position: sticky; top: 0; background: var(--bg); z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--teal); }
.brand b { color: var(--ink); font-size: 18px; }
.content { padding: 4px 16px 16px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; text-decoration: none; color: var(--soft); font-weight: 500; white-space: nowrap; min-height: 44px; }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.bottom { position: fixed; bottom: 0; inset-inline: 0; display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
.bottom a { display: flex; flex-direction: column; align-items: center; font-size: 12px; text-decoration: none; color: var(--soft); min-width: 64px; padding: 4px; }
.bottom a.on { color: var(--teal); font-weight: 700; }
.bottom .ic { width: 24px; height: 24px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; min-height: 40px; }
.chip.on { border-color: var(--teal); background: var(--teal-l); }

.list { list-style: none; margin: 0 0 12px; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.ledger .pos { color: var(--teal-d); }
.ledger .neg { color: var(--bad); }
.lvl { min-width: 150px; text-align: center; }

.big-num { font-size: 30px; font-weight: 700; margin: 8px 0; }
.huge { font-size: 46px; font-weight: 700; line-height: 1.1; }
.hero { text-align: center; }
.kidcard { display: flex; flex-direction: column; gap: 6px; }
.jars { display: flex; gap: 4px; margin: 10px 0; }
.jar { border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; font-size: 12px; min-width: 64px; }
.jar b { font-size: 15px; }
.jar.spend { background: var(--orange-l); color: #8A3B0F; }
.jar.save { background: var(--teal-l); color: var(--teal-d); }
.jar.give { background: var(--violet-l); color: var(--violet); }
.bar { height: 10px; background: #ECEAE4; border-radius: 99px; overflow: hidden; margin: 6px 0; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }

.cat { display: flex; flex-direction: column; gap: 10px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ECEAE4; }
.dots i.on { background: var(--teal); }

.steps { display: flex; gap: 6px; margin: 12px 0; }
.steps i { flex: 1; height: 6px; border-radius: 9px; background: #ECEAE4; }
.steps i.done { background: var(--teal); }
.steps i.on { background: #7FB5AC; }
.quiz h2 { font-size: 21px; line-height: 1.4; }
.opts { display: grid; gap: 10px; margin: 16px 0; }
.opt { text-align: start; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 17px; min-height: 52px; }
.opt.sel { border-color: var(--teal); background: var(--teal-l); }
.opt.right { border-color: var(--teal); background: var(--teal-l); color: var(--teal-d); font-weight: 700; }
.opt.wrong { border-color: var(--bad); background: var(--bad-l); color: var(--bad); }
.opt:disabled { cursor: default; }
.feedback { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.feedback.ok { background: var(--teal-l); }
.feedback.bad { background: var(--orange-l); }

.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 30; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

@media (min-width: 900px) {
  .shell.kid { max-width: 760px; }
  .bottom { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px 16px 0 0; }
}
label.btn { flex: none; flex-direction: row; font-size: 15px; color: var(--teal-d); }
.top .pill { font-size: 12px; }
.code { font-size: 34px; font-weight: 700; letter-spacing: 6px; text-align: center; background: var(--teal-l); color: var(--teal-d); border-radius: 12px; padding: 10px; margin: 6px 0 12px; }
.link-card.soft { background: var(--teal-l); border-color: transparent; }
.lesson h2 { font-size: 22px; margin-top: 6px; }
.lesson-text { font-size: 18px; line-height: 1.7; margin: 0 0 16px; }
.example { background: var(--orange-l); color: #5E2A0A; border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-size: 16px; }
.lesson-text p { margin: 0 0 12px; }
.lesson h3 { font-size: 16px; margin: 16px 0 6px; color: var(--soft); }
a.term { color: var(--teal-d); font-weight: 700; text-decoration: underline dotted 2px; text-underline-offset: 4px; }
details { margin: 12px 0; } summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--teal-d); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.term-chip { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.term-chip:hover { border-color: var(--teal); }
.search { margin-bottom: 14px; }
