@font-face{font-family:'Heebo';src:url(fonts/heebo-he.woff2) format('woff2');font-weight:100 900;font-display:swap;unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:'Heebo';src:url(fonts/heebo-la.woff2) format('woff2');font-weight:100 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Secular One';src:url(fonts/secular-he.woff2) format('woff2');font-display:swap;unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:'Secular One';src:url(fonts/secular-la.woff2) format('woff2');font-display:swap;unicode-range:U+0000-00FF,U+2000-206F}
:root{--paper:#F5F0E6;--ink:#14121F;--lime:#B6F03C;--orange:#FF5B2E;--blue:#3B4BFF;--pink:#FF7CC8;--yellow:#D3B436;--muted:#6B667A;--good:#556B2B;--bad:#B3261E;
 --display:'Secular One','Heebo',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;--body:'Heebo',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
 --safeT:env(safe-area-inset-top,0px);--safeB:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--ink);color:var(--ink);font-family:var(--body);overflow:hidden;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
button{font:inherit;color:inherit}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.n,.chip b,.chip i{direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:8px 16px;border:2.5px solid var(--ink);border-radius:999px;background:#FFFFFF;box-shadow:3px 3px 0 var(--ink);font-weight:700;cursor:pointer;touch-action:manipulation}
.btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.btn.primary{background:var(--lime)}.btn.orange{background:var(--orange);color:#FFFFFF}.btn.blue{background:var(--blue);color:#FFFFFF}.btn.ghost{background:transparent;box-shadow:none}.btn.wide{width:100%}.btn.small{padding:4px 12px;font-size:14px}
.btn[disabled],.btn.off{opacity:.45;cursor:not-allowed}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
[hidden]{display:none!important}
/* ---------- משחק ---------- */
#game{position:fixed;inset:0;display:flex;flex-direction:column;background:var(--paper)}
#top{padding:calc(var(--safeT) + 6px) 6px 4px;display:flex;flex-direction:column;gap:4px;background:var(--paper);border-bottom:2.5px solid var(--ink);z-index:2}
#res{display:flex;flex-wrap:wrap;gap:4px}
.chip{display:flex;align-items:center;gap:4px;min-height:44px;padding:2px 9px;border:2px solid var(--ink);border-radius:12px;background:#FFFFFF;font-size:14px;white-space:nowrap;cursor:pointer}
.chip .ic{font-size:15px}.chip b{font-weight:800}.chip i{font-style:normal;font-size:11px}.chip i.up{color:var(--good)}.chip i.dn{color:var(--bad)}
.chip.goal{flex:1 1 150px;flex-direction:column;align-items:stretch;justify-content:center;gap:2px;padding:3px 9px}
.chip.goal .gl{display:flex;justify-content:space-between;font-size:12px}
.bar{height:7px;border-radius:5px;background:#EDE5D6;border:1.5px solid var(--ink);overflow:hidden}.bar>span{display:block;height:100%;background:var(--lime)}
.chip.warn{background:#FFDED5;border-color:var(--bad)}.chip.rec{background:#E8F0C4}
.ticker{display:block;width:100%;min-height:44px;text-align:start;padding:4px 10px;border:2px solid var(--ink);border-radius:12px;background:var(--ink);color:var(--paper);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.ticker.bad{background:#722F25}.ticker.good{background:#556B2B}
#tut{border:2.5px solid var(--ink);border-radius:14px;background:var(--lime);padding:4px 4px 4px 8px;display:flex;gap:6px;align-items:center}
#tut .tt{flex:1;min-width:0;display:flex;flex-direction:column}#tut .tbs{display:flex;gap:4px;flex:none}
.tut-step{font-size:11px;font-weight:800}.tut-task{font-size:13px;line-height:1.3}#tut .btn{padding:4px 10px;min-width:44px}
#stage{flex:1;position:relative;min-height:0;overflow:hidden}
#cv{position:absolute;inset:0;width:100%;height:100%;touch-action:none;display:block;cursor:grab}
#cv.tool{cursor:crosshair}
#toolHint{position:absolute;top:8px;inset-inline:8px;margin:auto;max-width:520px;display:flex;align-items:center;gap:8px;padding:6px 6px 6px 12px;border:2.5px solid var(--ink);border-radius:16px;background:#FFFFFF;box-shadow:3px 3px 0 var(--ink);font-size:14px;z-index:3}
#toolHint .tx{flex:1;line-height:1.3}#toolHint b{font-family:var(--display);font-weight:400}
#zoomBtns{position:absolute;inset-inline-start:8px;bottom:10px;display:flex;flex-direction:column;gap:8px;z-index:2}
.fab{width:46px;height:46px;border-radius:50%;border:2.5px solid var(--ink);background:#FFFFFF;box-shadow:2px 2px 0 var(--ink);display:flex;align-items:center;justify-content:center;cursor:pointer}
#bar{display:flex;gap:4px;align-items:stretch;padding:6px 6px calc(var(--safeB) + 6px);border-top:2.5px solid var(--ink);background:#FFFFFF;z-index:7;position:relative}
.tb{flex:1 1 0;min-width:44px;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:2px solid transparent;border-radius:14px;background:transparent;font-size:12px;font-weight:700;cursor:pointer;padding:2px}
.tb:active,.tb.on{background:var(--lime);border-color:var(--ink)}
.tb.speed{background:var(--ink);color:var(--paper);border-color:var(--ink)}.tb.speed small{font-size:10px;font-weight:400;opacity:.85;direction:ltr}
/* גיליון תחתון */
#scrim{position:fixed;inset:0;bottom:calc(68px + var(--safeB));background:rgba(20,18,31,.35);opacity:0;pointer-events:none;transition:opacity .2s;z-index:5}#scrim.on{opacity:1;pointer-events:auto}
#sheet{position:fixed;inset-inline:0;bottom:calc(68px + var(--safeB));max-height:calc(100% - 150px);overflow:auto;background:var(--paper);border-top:3px solid var(--ink);border-radius:22px 22px 0 0;padding:8px 12px 14px;box-shadow:0 -4px 0 rgba(20,18,31,.08);transform:translateY(calc(100% + 40px));visibility:hidden;transition:transform .22s ease-out,visibility 0s .22s;z-index:6;overscroll-behavior:contain}
#sheet.open{transform:none;visibility:visible;transition:transform .22s ease-out}
#sheet h2{font-family:var(--display);font-weight:400;margin:2px 0 8px;font-size:23px;display:flex;align-items:center;gap:8px}
#sheet h3{font-family:var(--display);font-weight:400;font-size:17px;margin:14px 0 6px}
#sheet p{margin:4px 0 8px;line-height:1.45}
.grab{width:44px;height:5px;border-radius:3px;background:var(--ink);opacity:.3;margin:2px auto 6px}
.shead{display:flex;align-items:center;gap:8px}.shead h2{flex:1}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:10px}
.card{display:grid;grid-template-columns:auto 1fr;gap:2px 8px;align-items:center;text-align:start;min-height:64px;padding:8px;border:2.5px solid var(--ink);border-radius:14px;background:#FFFFFF;box-shadow:3px 3px 0 var(--ink);cursor:pointer}
.card .ic{grid-row:1/4;font-size:26px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:10px;border:2px solid var(--ink);background:var(--paper)}
.card .ic svg{width:26px;height:26px}
.card small{color:var(--muted);font-size:12px;line-height:1.3}.card .price{font-weight:800;font-size:13px}.card.off{opacity:.5}.card.sel{background:var(--lime)}
.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.kv{display:grid;grid-template-columns:1fr auto;gap:4px 10px;font-size:14px;margin:6px 0}.kv>:nth-child(even){font-weight:700;text-align:end}
.list{display:flex;flex-direction:column;gap:6px}
.item{display:flex;align-items:center;gap:8px;min-height:52px;padding:6px 10px;border:2px solid var(--ink);border-radius:12px;background:#FFFFFF;text-align:start;cursor:pointer;width:100%}
.item .ic{font-size:20px;width:34px;text-align:center}.item .grow{flex:1;min-width:0;overflow:hidden}.item>span:last-child:not(.grow){flex:none}.item .t{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pos{color:var(--good)}.neg{color:var(--bad)}
.rbar{display:inline-block;width:64px;height:8px;border-radius:4px;border:1.5px solid var(--ink);background:#F5F0E6;vertical-align:middle;overflow:hidden}.rbar>span{display:block;height:100%}
.pill{display:inline-flex;align-items:center;gap:4px;padding:2px 9px;border-radius:999px;border:1.5px solid var(--ink);background:#FFFFFF;font-size:12px;font-weight:700;white-space:nowrap}
.pill.lime{background:var(--lime)}.pill.orange{background:var(--orange);color:#FFFFFF}.pill.blue{background:var(--blue);color:#FFFFFF}.pill.warn{background:#FFDED5}
.seg{display:flex;flex-wrap:wrap;gap:6px}.seg button{min-height:44px;padding:4px 12px;border:2px solid var(--ink);border-radius:12px;background:#FFFFFF;font-weight:700;cursor:pointer}.seg button.on{background:var(--lime)}
.step{display:inline-flex;align-items:center;border:2px solid var(--ink);border-radius:12px;overflow:hidden;background:#FFFFFF}.step button{min-width:44px;min-height:44px;border:0;background:#FFFFFF;font-size:20px;font-weight:800;cursor:pointer}.step b{min-width:40px;text-align:center}
.est{border:2px dashed var(--ink);border-radius:12px;padding:8px 10px;background:#FFFFFF;font-size:14px;line-height:1.5}
.tog{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:4px 10px;border:2px solid var(--ink);border-radius:12px;background:#FFFFFF;width:100%;cursor:pointer;font-weight:700;text-align:start}
.tog .sw{width:48px;height:28px;border-radius:14px;border:2px solid var(--ink);background:#D8D7DA;position:relative;flex:none}.tog .sw::after{content:'';position:absolute;top:2px;inset-inline-start:2px;width:20px;height:20px;border-radius:50%;background:#FFFFFF;border:2px solid var(--ink);transition:.15s}
.tog[aria-pressed=true] .sw{background:var(--lime)}.tog[aria-pressed=true] .sw::after{inset-inline-start:22px}
table.fin{width:100%;border-collapse:collapse;font-size:13px}table.fin td{padding:5px 4px;border-bottom:1px solid #EDE5D6}table.fin td:not(:first-child){text-align:end;font-weight:700;direction:ltr;unicode-bidi:isolate}
canvas.chart{width:100%;height:150px;display:block;border:2px solid var(--ink);border-radius:12px;background:#FFFFFF}
.news{font-size:13px;line-height:1.4}.news .item{min-height:44px;cursor:default}
.help p{font-size:14px}.help b{font-family:var(--display);font-weight:400}
#toast{position:fixed;inset-inline:12px;bottom:calc(var(--safeB) + 84px);margin:auto;max-width:440px;padding:10px 14px;border:2.5px solid var(--ink);border-radius:14px;background:#FFFFFF;box-shadow:3px 3px 0 var(--ink);opacity:0;transform:translateY(8px);transition:.2s;pointer-events:none;z-index:8;text-align:center;font-weight:600}
#toast.show{opacity:1;transform:none}#toast.bad{background:#FFDED5}#toast.info{background:#E3E6FF}#toast.good{background:var(--lime)}
#end{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(20,18,31,.55);z-index:9;padding:20px}
#end .panel{background:var(--paper);border:3px solid var(--ink);border-radius:22px;box-shadow:6px 6px 0 var(--ink);padding:20px;text-align:center;max-width:380px;width:100%}
#end h2{font-family:var(--display);font-weight:400;font-size:32px;margin:0 0 6px}#end .kv{text-align:start}
/* ---------- מסך פתיחה ---------- */
#title{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;background:linear-gradient(180deg,rgba(20,18,31,.35),rgba(20,18,31,.7));z-index:4;overflow:auto}
.tcard{width:100%;max-width:440px;background:var(--paper);border:3px solid var(--ink);border-radius:26px;box-shadow:7px 7px 0 var(--ink);padding:18px 16px;text-align:center}
.logo svg{width:72px;height:72px;stroke:none}
#title h1{font-family:var(--display);font-weight:400;font-size:52px;line-height:1;margin:4px 0 0;letter-spacing:.5px}
.sub{margin:2px 0 6px;font-weight:800;color:var(--ink);font-size:17px;text-decoration:underline;text-decoration-color:var(--orange);text-decoration-thickness:3px;text-underline-offset:5px}.pitch{margin:0 0 12px;color:#3A3650;font-size:14px;line-height:1.5}
#bCont{flex-direction:column;line-height:1.2;margin-bottom:10px;font-size:18px}#bCont small{font-weight:400;font-size:12px}
.diffs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.dcard{display:flex;flex-direction:column;gap:3px;min-height:92px;padding:8px 6px;border:2.5px solid var(--ink);border-radius:16px;background:#FFFFFF;box-shadow:3px 3px 0 var(--ink);cursor:pointer}
.dcard b{font-family:var(--display);font-weight:400;font-size:20px}.dcard small{font-size:11px;color:var(--muted);line-height:1.35}
.dcard:nth-child(1) b{color:#556B2B}.dcard:nth-child(2) b{color:var(--blue)}.dcard:nth-child(3) b{color:#B3261E}
.dcard:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.trow{display:flex;justify-content:center;gap:8px;margin-top:10px;flex-wrap:wrap}.ver{font-size:11px;color:var(--muted);margin:8px 0 0}
@media (max-width:599px){.chip.loan{display:none}.chip.goal{flex:1 1 110px;min-width:0}.chip.goal .gl{font-size:11px}.chip{padding:2px 7px;font-size:13px}}
@media (min-width:900px){
 #top{flex-direction:row;flex-wrap:wrap;align-items:center}#res{flex:1 1 auto}.ticker{flex:0 1 420px;width:auto}#tut{flex:1 1 100%}
 .chip{font-size:15px}.chip.goal{flex:0 1 220px}
 #sheet{inset-inline:auto;left:16px;width:440px;bottom:16px;max-height:calc(100vh - 140px);border:3px solid var(--ink);border-radius:22px;box-shadow:6px 6px 0 var(--ink)}
 #bar{justify-content:center;gap:8px}.tb{flex:0 0 96px;font-size:13px}
 #toast{bottom:96px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
body.so #toast{bottom:auto;top:calc(var(--safeT) + 70px)}
@media (min-width:900px){body.so #toast{top:auto;bottom:96px}}

.lc-credits{margin:10px auto 0;font-size:13px;text-align:center}.lc-credits summary{min-height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer}.lc-credits ul{list-style:none;padding:0;margin:4px 0 0;line-height:1.6}.lc-credits a{display:inline-block;min-height:44px;line-height:44px;padding:0 6px;color:#3B4BFF}
.ic.rank{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;color:#14121F;font-weight:800;border:2px solid #14121F}
.item.me{outline:3px solid #B6F03C;outline-offset:-3px}
.list.adv .t,.list.adv small{white-space:normal;overflow:visible;text-overflow:clip}.list.adv .item{height:auto;min-height:56px;align-items:center}

/* 1.2.0: חוזים, קווים, שכבת זרימה */
.tb{position:relative}
.badge{position:absolute;top:3px;inset-inline-end:8px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--orange,#FF5B2E);color:#FFFFFF;font-style:normal;font-size:11px;line-height:18px;border:1.5px solid var(--ink)}
.fab[aria-pressed="true"]{background:#B6F03C}
.fab svg{width:22px;height:22px;fill:none;stroke:var(--ink);stroke-width:2.5;stroke-linecap:round}
.ctr{border:2px solid var(--ink);border-radius:14px;padding:8px 10px;margin:8px 0;background:#FFFFFF}
.ctr.on{background:#F0FCD8}
.ctr .ct1{display:flex;gap:8px;align-items:center}.ctr .ct1 .ic{font-size:22px}.ctr .ct1 .grow{flex:1;display:flex;flex-direction:column}.ctr .ct1 small{opacity:.85}
.ctr .ct2{margin:6px 0;font-size:13px}.ctr .row .btn{min-height:44px}
.route{border-bottom:1.5px solid #D0CBC6;padding-bottom:6px;margin-bottom:6px}.route .row .btn{min-height:44px}
.kv.small{font-size:13px;margin:2px 0 6px}

/* b9 1.2.2: the title card scrolls instead of being cut off at the top (phone landscape); landscape phone: one-row header, side sheet; toast never covers the open sheet's header; update corner 44px and hidden during play */
#title{align-items:flex-start}
.tcard{margin:auto}
body .tu-c{width:44px;height:44px;line-height:44px}
body:has(#title[hidden]) .tu-c,body:has(#title.hidden) .tu-c{display:none}
body.so #toast{top:calc(var(--safeT) + 4px)}
@media (orientation:landscape) and (max-height:500px) and (max-width:899px){
 #title{padding:10px}
 #title h1{font-size:40px}
 #top{flex-direction:row;flex-wrap:wrap;align-items:center}
 #res{flex:1 1 auto}
 .ticker{flex:0 1 300px;width:auto}
 #tut{flex:1 1 100%}
 .tut-task{font-size:12.5px;line-height:1.25}
 #sheet{inset-inline:auto;left:8px;width:min(440px,56vw);top:calc(var(--safeT) + 6px);max-height:none;border:3px solid var(--ink);border-radius:22px;box-shadow:6px 6px 0 var(--ink)}
}
