/* theory-book.css – ספר לימוד התיאוריה ולוח התמרורים */
html body #thBook>*{min-width:0;max-width:100%}html body #thBook #tbSigns,html body #thBook #tbList,html body #thBook .tb-g{min-width:0}
html body #thBook{min-width:0;max-width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding-bottom:18px;margin-bottom:4px;border-bottom:1px solid #EEF1F4;font-family:Assistant,Rubik,Arial,sans-serif;color:#0F172A}
html body #thBook h2,html body #thBook h3{font-family:Rubik,Arial,sans-serif}
.tb-head{display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:linear-gradient(135deg,#0E2A27,#0E5A54);color:#fff;border-radius:22px;padding:20px 22px}
.tb-head>div:first-child{flex:1 1 320px}
.tb-head small{font:700 13px Assistant,Arial;color:#3FE0B0}
html.nga-on body #nga-main #thBook .tb-head h2,html body #thBook .tb-head h2{margin:2px 0 6px!important;font:900 clamp(22px,3.2vw,30px)/1.15 Rubik,Arial!important;color:#fff!important}
.tb-head p{margin:0;font:500 14.5px/1.6 Assistant,Arial;color:#CFE9E2;max-width:640px}
.tb-prog{width:104px;height:104px;border-radius:50%;background:conic-gradient(#3FE0B0 calc(var(--p)*1%),rgba(255,255,255,.14) 0);display:grid;place-items:center;position:relative;flex:none}
.tb-prog::before{content:"";position:absolute;inset:9px;border-radius:50%;background:#0E3B37}
.tb-prog b,.tb-prog span{position:relative}.tb-prog b{font:900 24px Rubik,Arial;margin-top:22px}.tb-prog span{font:600 11px Assistant,Arial;color:#A8D8CC;margin-top:-34px;text-align:center;width:70px}
.tb-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.tb-card{width:100%;height:100%;display:flex;gap:12px;align-items:flex-start;text-align:right;background:#fff;border:1px solid #E2E8F0;border-radius:18px;padding:14px;cursor:pointer;font:inherit;color:inherit;position:relative;transition:transform .15s,box-shadow .15s,border-color .15s}
.tb-card:hover{transform:translateY(-2px);border-color:#0E6E68;box-shadow:0 14px 28px -20px rgba(14,110,104,.6)}
.tb-card i{width:42px;height:42px;flex:none;border-radius:13px;background:#E6F4F1;display:grid;place-items:center}
.tb-card svg,.tb-t svg{width:22px;height:22px;fill:none;stroke:#0E6E68;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tb-card span{display:grid;gap:2px;min-width:0}.tb-card small{font:700 11.5px Assistant,Arial;color:#0E6E68}.tb-card b{font:800 15.5px/1.25 Rubik,Arial}.tb-card em{font:500 13px/1.45 Assistant,Arial;color:#64748B;font-style:normal}
.tb-card u{position:absolute;top:10px;left:10px;width:22px;height:22px;border-radius:50%;background:#16A34A;color:#fff;text-decoration:none;display:grid;place-items:center;font:800 12px Arial}
.tb-card.big{background:linear-gradient(135deg,#FFF5F3,#fff);border-color:#F6C9C1}.tb-card.big i{background:#FDE2DD}.tb-card.big svg{stroke:#DC2626}
.tb-card.done{border-color:#BBE5D3}
.tb-bar{display:flex;justify-content:space-between;align-items:center;gap:10px}
.tb-back,.tb-b{min-height:40px;border-radius:999px;border:1px solid #CBD5E1;background:#fff;padding:0 16px;font:700 14px Assistant,Arial;color:#0F172A;cursor:pointer}
.tb-back:hover,.tb-b:hover{border-color:#0E6E68;color:#0E6E68}.tb-b.p{background:#0E6E68;border-color:#0E6E68;color:#fff}.tb-b.p:hover{color:#fff;filter:brightness(1.08)}
.tb-bar small{font:600 13px Assistant,Arial;color:#64748B}
html.nga-on body #nga-main #thBook h2.tb-t,html body #thBook h2.tb-t{margin:0!important;display:flex;align-items:center;gap:10px;font:900 clamp(22px,3vw,28px) Rubik,Arial!important}
.tb-t i{width:44px;height:44px;border-radius:14px;background:#E6F4F1;display:grid;place-items:center}
.tb-s{margin:-8px 0 0;color:#64748B;font-size:15px}
.tb-sec{background:#fff;border:1px solid #E8EDF2;border-radius:18px;padding:16px 18px;display:grid;gap:8px}
html.nga-on body #nga-main #thBook .tb-sec h3,html body #thBook .tb-sec h3{margin:0!important;font:800 17px Rubik,Arial!important;color:#0E3B37}
.tb-sec p{margin:0;font-size:15.5px;line-height:1.75}
.tb-sec ul{margin:0;padding-inline-start:20px;display:grid;gap:7px;font-size:15.5px;line-height:1.7}
.tb-sec li::marker{color:#0E6E68}
.tb-tip{background:#FFF8E6;border:1px solid #F3DE9C;border-radius:14px;padding:10px 14px;font-size:14.5px;line-height:1.65;color:#5A4300}
.tb-tip b{display:block;font:800 13px Rubik,Arial;color:#9A6B00;margin-bottom:2px}.tb-tip a{color:#0E6E68;font-weight:700}
.tb-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.tb-chip{display:flex;align-items:center;gap:8px;max-width:260px;text-align:right;border:1px solid #E2E8F0;background:#F8FAFC;border-radius:14px;padding:6px 10px 6px 8px;cursor:pointer;font:500 12.5px/1.35 Assistant,Arial;color:#334155}
.tb-chip:hover{border-color:#0E6E68;background:#fff}
.tb-chip img{width:44px;height:44px;object-fit:contain;flex:none}
.tb-chip span{display:grid}.tb-chip b{font:800 13px Rubik,Arial;color:#0F172A}
.tb-nav{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:4px}
/* לוח התמרורים */
.tb-sbar{position:sticky;top:8px;z-index:3}
.tb-q{display:flex;align-items:center;gap:10px;background:#fff;border:1.5px solid #CBD5E1;border-radius:999px;padding:0 16px;height:50px;box-shadow:0 10px 26px -22px rgba(15,23,42,.5)}
.tb-q:focus-within{border-color:#0E6E68}
.tb-q svg{width:20px;height:20px;fill:none;stroke:#64748B;stroke-width:2;stroke-linecap:round;flex:none}
html body #thBook .tb-q input{flex:1;border:0!important;outline:0;box-shadow:none!important;padding:0!important;height:auto!important;background:none!important;font:500 16px Assistant,Arial;color:#0F172A;min-width:0}
.tb-gr{display:flex;gap:8px;overflow-x:auto;padding:12px 0 4px;scrollbar-width:none}.tb-gr::-webkit-scrollbar{display:none}
.tb-gr button{--c:#0E6E68;flex:none;min-height:38px;border-radius:999px;border:1px solid #E2E8F0;background:#fff;padding:0 14px;font:700 13.5px Assistant,Arial;color:#334155;cursor:pointer;white-space:nowrap}
.tb-gr button small{font-weight:600;color:#94A3B8;margin-inline-start:2px}
.tb-gr button[aria-pressed="true"]{background:var(--c);border-color:var(--c);color:#fff}.tb-gr button[aria-pressed="true"] small{color:rgba(255,255,255,.8)}
.tb-g{margin-top:18px}
html.nga-on body #nga-main #thBook .tb-g h3,html body #thBook .tb-g h3{margin:0 0 4px!important;font:800 18px Rubik,Arial!important;display:flex;align-items:center;gap:10px}
.tb-g h3::before{content:"";width:6px;height:22px;border-radius:4px;background:var(--c)}
.tb-g h3 small{font:600 12.5px Assistant,Arial;color:#94A3B8}
.tb-g>p{margin:0 0 10px;color:#64748B;font-size:14px}
.tb-sg{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px}
.tb-sc{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:#fff;border:1px solid #E8EDF2;border-radius:16px;padding:10px 8px 12px;cursor:pointer;font:inherit;color:inherit;transition:transform .15s,box-shadow .15s,border-color .15s}
.tb-sc:hover{transform:translateY(-2px);border-color:var(--c);box-shadow:0 12px 24px -18px rgba(15,23,42,.45)}
.tb-sc .im{width:100%;height:92px;display:grid;place-items:center}
.tb-sc img{max-width:100%;max-height:92px;object-fit:contain}
.tb-sc b{font:800 14px Rubik,Arial;color:var(--c)}
.tb-sc em{font:600 13px/1.35 Assistant,Arial;color:#334155;font-style:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tb-none{text-align:center;color:#64748B;padding:30px 0}
/* חלון תמרור */
.tb-dlg{position:fixed;inset:0;z-index:10050;background:rgba(8,20,18,.55);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:16px}
.tb-dlg[hidden]{display:none}
.tb-dc{position:relative;width:min(520px,100%);max-height:calc(100vh - 32px);overflow:auto;background:#fff;border-radius:24px;padding:22px;display:grid;gap:8px;text-align:right;font-family:Assistant,Arial;color:#0F172A;box-shadow:0 30px 70px -20px rgba(0,0,0,.45);animation:tbPop .18s ease-out}
@keyframes tbPop{from{transform:translateY(10px) scale(.97);opacity:0}to{transform:none;opacity:1}}
.tb-x{position:absolute;top:12px;left:12px;width:38px;height:38px;border-radius:50%;border:0;background:#F1F5F9;font:400 24px/1 Arial;cursor:pointer;color:#334155}
.tb-dimg{height:200px;display:grid;place-items:center;background:#F8FAFC;border-radius:18px;padding:14px}
.tb-dimg img{max-width:100%;max-height:172px;object-fit:contain}
.tb-dc small{font:800 13px Rubik,Arial;margin-top:6px}
.tb-dc h3{margin:0;font:900 24px Rubik,Arial}
.tb-dn{margin:0;font:700 17px/1.45 Assistant,Arial}
.tb-dm{margin:0;font:500 15.5px/1.75 Assistant,Arial;color:#334155;background:#F8FAFC;border-radius:14px;padding:12px 14px}
.tb-dm a{color:#0E6E68;font-weight:800}
.tb-dnav{display:flex;justify-content:space-between;gap:8px;margin-top:4px}
.tb-dnav button{min-height:40px;border-radius:999px;border:1px solid #CBD5E1;background:#fff;padding:0 14px;font:700 13.5px Assistant,Arial;cursor:pointer}
.tb-dnav button:hover{border-color:#0E6E68;color:#0E6E68}
html.tb-lock{overflow:hidden}
@media(max-width:560px){.tb-head{padding:16px;border-radius:18px}.tb-prog{width:84px;height:84px}.tb-prog b{font-size:20px}.tb-sg{grid-template-columns:repeat(2,minmax(0,1fr))}.tb-sec{padding:14px}.tb-chip{max-width:100%;flex:1 1 100%}}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .tb-card,:root:not([data-theme="light"]) .tb-sec,:root:not([data-theme="light"]) .tb-sc{background:#fff}}

/* כרטיסי פרקים צבעוניים עם תמרור אמיתי */
html body #thBook .tb-card{--cc:#0E6E68;background:linear-gradient(160deg,color-mix(in srgb,var(--cc) 9%,#fff) 0%,#fff 62%);border-color:color-mix(in srgb,var(--cc) 22%,#E2E8F0);overflow:hidden;padding:14px 14px 14px 12px;min-height:96px;align-items:center}
html body #thBook .tb-card::after{content:"";position:absolute;inset:auto auto -28px -28px;width:90px;height:90px;border-radius:50%;background:color-mix(in srgb,var(--cc) 10%,transparent)}
html body #thBook .tb-card:hover{border-color:var(--cc);box-shadow:0 16px 30px -20px color-mix(in srgb,var(--cc) 70%,transparent)}
html body #thBook .tb-art{width:62px;height:62px;flex:none;border-radius:18px;background:#fff;display:grid;place-items:center;box-shadow:0 8px 18px -10px color-mix(in srgb,var(--cc) 60%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--cc) 18%,#fff);position:relative;z-index:1}
html body #thBook .tb-art img{width:50px;height:50px;object-fit:contain}
html body #thBook .tb-art svg{width:48px;height:48px;fill:initial;stroke:none}
html body #thBook .tb-card small{color:var(--cc)}
html body #thBook .tb-card span{position:relative;z-index:1}
html body #thBook .tb-card.big{background:linear-gradient(135deg,#FFF1EE,#fff 70%)}
html body #thBook .tb-card.done{border-color:color-mix(in srgb,var(--cc) 30%,#BBE5D3)}
html body #thBook .tb-card u{z-index:2}
html body #thBook h2.tb-t .tb-art{width:54px;height:54px;border-radius:16px}
html body #thBook h2.tb-t .tb-art img{width:42px;height:42px}html body #thBook h2.tb-t .tb-art svg{width:40px;height:40px}

/* "ללמוד את זה בספר" – מתוך התרגול והמבחן */
.tb-learn{display:inline-flex;align-items:center;gap:6px;margin-top:8px;min-height:36px;border-radius:999px;border:1px solid #99D5CC;background:#E6F4F1;color:#0E5A54;padding:0 14px;font:800 13.5px Assistant,Arial;cursor:pointer}
.tb-learn:hover{background:#0E6E68;border-color:#0E6E68;color:#fff}
.tb-pk .tb-pkc{width:min(760px,100%);gap:12px;background:#F7F9FB}
.tb-pk .tb-pkc>small{font:800 13px Rubik,Arial}
.tb-pk h2.tb-t{margin:0;display:flex;align-items:center;gap:10px;font:900 22px Rubik,Arial;color:#0F172A}
.tb-pk .tb-art{width:52px;height:52px;flex:none;border-radius:16px;background:#fff;display:grid;place-items:center;box-shadow:0 6px 14px -8px rgba(15,23,42,.4)}
.tb-pk .tb-art img{width:40px;height:40px;object-fit:contain}.tb-pk .tb-art svg{width:40px;height:40px}
.tb-pk .tb-sec h3{margin:0;font:800 16.5px Rubik,Arial;color:#0E3B37}
.tb-pk .tb-b.p{justify-self:start}
