/* The teach-first step kinds of teach.js and the generic topic page of topic.js. Sits on notes.css, journey.css and lesson.css. */

/* ---------- a story card with a drawn figure instead of a picture ---------- */
.st-fig { background: #fdf6e8; padding: 14px 12px 8px; }
.st-fig svg { display: block; width: 100%; height: auto; max-height: 250px; margin: 0 auto; }
.jhero .pic.fig { background: #fdf6e8; padding: 12px 14px 6px; }
.jhero .pic.fig svg { display: block; width: 100%; height: auto; max-height: 200px; margin: 0 auto; }

/* ---------- anim: watch it, one beat at a time ---------- */
.anm { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 12px 14px 14px; box-shadow: var(--shadow); }
.anm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 34px; }
.anm-k { font-size: 13.5px; font-weight: 700; color: var(--lc, var(--peach)); letter-spacing: .02em; }
.anm h3 { margin: 2px 0 6px; font-size: 20px; }
.anm-pill { font-size: 16.5px; background: var(--lc, var(--peach)); }
.anm-fig { background: #fdf6e8; border-radius: 16px; padding: 6px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.anm-fig svg { display: block; width: 100%; height: auto; max-width: 520px; max-height: 46vh; margin: 0 auto; }
.anm-fig.in { animation: jfade .45s ease both; }
.anm-say { min-height: 4.6em; margin-top: 10px; font-size: 17.5px; line-height: 1.65; background: var(--soft); border-radius: 16px; padding: 10px 14px; }
.anm-say.in { animation: rise .3s ease; }
.anm-say b { color: var(--lc, var(--peach)); }
.anm-dots { display: flex; gap: 5px; justify-content: center; margin: 10px 0 2px; }
.anm-dots i { width: 22px; height: 6px; border-radius: 99px; background: #e4dccb; }
.anm-dots i.on { background: var(--lc, var(--peach)); }
.anm-act { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; min-height: 44px; }
.anm-act .anm-again { margin-right: auto; }
.anm-scrub { margin-top: 10px; }
.anm-scrub small { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 600; color: var(--teal); }
.anm-scrub input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: none; margin: 0; --p: 100%; }
.anm-scrub input[type=range]::-webkit-slider-runnable-track { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--mint) var(--p), #e4dccb var(--p)); }
.anm-scrub input[type=range]::-moz-range-track { height: 12px; border-radius: 99px; background: #e4dccb; }
.anm-scrub input[type=range]::-moz-range-progress { height: 12px; border-radius: 99px; background: var(--mint); }
.anm-scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--mint); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.anm-scrub input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid var(--mint); box-shadow: 0 3px 8px rgba(0,0,0,.25); }

/* ---------- clear: the wrong idea, then what really happens ---------- */
.clr, .bin, .mch, .fil { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.clr h3 { margin: 2px 0 4px; font-size: 20px; }
.clr-it { margin-top: 12px; border: 2px solid var(--line); border-radius: 16px; padding: 12px; }
.clr-it small { display: block; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.clr-w { font-size: 17.5px; line-height: 1.6; font-weight: 600; }
.clr-fig { background: var(--soft); border-radius: 12px; padding: 6px; margin-bottom: 8px; } .clr-fig svg { display: block; max-width: 300px; width: 100%; height: auto; margin: 0 auto; }
.clr-go { margin-top: 10px; font: 700 15.5px/1.3 var(--font); border: 2px solid #ecd58f; background: var(--gold-bg); color: var(--gold); border-radius: 12px; padding: 8px 14px; cursor: pointer; }
.clr-it.on { border-color: var(--mint); }
.clr-it.on .clr-w { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--rose); }
.clr-r { margin-top: 10px; background: var(--mint-bg); border-radius: 12px; padding: 10px 12px; animation: rise .25s ease; }
.clr-r small { color: var(--mint); }
.clr-r b { display: block; font-size: 17.5px; line-height: 1.6; }
.clr-r p { margin: 4px 0 0; font-size: 16px; line-height: 1.65; }

/* ---------- bins ---------- */
.bin-left { margin-top: 10px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.bin-chip { margin: 4px auto 10px; max-width: 440px; text-align: center; font-weight: 700; font-size: 19px; line-height: 1.5; background: var(--gold-bg); border: 2px solid #ecd58f; border-radius: 16px; padding: 12px; }
.bin-chip.in { animation: pop .3s ease; }
.bin-fig svg { display: block; max-width: 200px; max-height: 120px; width: 100%; height: auto; margin: 0 auto 4px; }
.bin-b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bin-b.n3 { grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.bin-b button { font: 700 16.5px/1.3 var(--font); border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 13px 6px; color: var(--ink); box-shadow: 0 3px 0 var(--line); cursor: pointer; overflow-wrap: anywhere; }
.bin-b.n3 button { font-size: 15px; padding: 12px 4px; }
.bin-b button.wrong { border-color: var(--rose); background: var(--rose-bg); animation: shake .3s; }
.bin-done { display: grid; gap: 6px; margin-top: 14px; }
.bin-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; background: var(--soft); border-radius: 12px; padding: 7px 10px; font-size: 15px; line-height: 1.45; animation: pop .3s ease; }
.bin-row span { font-weight: 600; } .bin-row b { color: var(--mint); font-size: 14px; white-space: nowrap; }
.bin-row small { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

/* ---------- match ---------- */
.mch-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mch-l, .mch-r { display: grid; gap: 8px; align-content: start; }
.mch-g button { font: 600 15.5px/1.4 var(--font); text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 13px; padding: 10px; color: var(--ink); box-shadow: 0 3px 0 var(--line); cursor: pointer; min-height: 52px; overflow-wrap: anywhere; }
.mch-l button { font-weight: 700; }
.mch-g button.on { border-color: var(--gold); background: var(--gold-bg); box-shadow: 0 3px 0 #ecd58f; }
.mch-g button.wrong { border-color: var(--rose); background: var(--rose-bg); animation: shake .3s; }
.mch-g button.done { border-color: var(--mint); background: var(--mint-bg); box-shadow: none; cursor: default; color: var(--ink); }
.mch-g button i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 13px; font-weight: 700; }

/* ---------- fill ---------- */
.fil-t { margin: 12px 0; background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 18px; line-height: 2.3; }
.fil-b { display: inline-block; min-width: 74px; min-height: 1.5em; line-height: 1.5; vertical-align: middle; border-bottom: 2.5px dashed #c9bfa8; border-radius: 6px; padding: 0 6px; text-align: center; font-weight: 700; }
.fil-b.now { border-bottom-color: var(--gold); background: var(--gold-bg); }
.fil-b.on { border-bottom-color: transparent; background: #ffe28a; animation: pop .3s ease; }

/* ---------- the generic "at a glance" and practice tabs ---------- */
.gl-strip.scroll { display: flex; overflow-x: auto; scrollbar-width: none; } .gl-strip.scroll::-webkit-scrollbar { display: none; }
.gl-strip.scroll button { flex: none; width: 23%; min-width: 84px; }
.gl-strip button.txt { padding: 9px 4px; font-size: 13.5px; }
.gl-card .fig { background: #fdf6e8; border-radius: 14px; padding: 4px; margin: 6px 0; }
.gl-card .fig svg { display: block; }
details.sq { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 8px 0; }
details.sq summary { cursor: pointer; font-weight: 600; list-style: none; font-size: 16.5px; line-height: 1.55; }
details.sq summary::-webkit-details-marker { display: none; }
details.sq summary::after { content: ' ▾'; color: var(--muted); }
details.sq[open] summary::after { content: ' ▴'; }
details.sq .ans { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 16px; line-height: 1.7; }
details.sq .ans p { margin: 4px 0; } details.sq .ans ol { margin: 4px 0; padding-left: 22px; list-style-type: bengali; }
details.sq .ans table { width: 100%; border-collapse: collapse; font-size: 15px; } details.sq .ans td, details.sq .ans th { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; }
.sqtag { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.sqcols { display: grid; gap: 0 12px; } @media (min-width: 900px) { .sqcols { grid-template-columns: 1fr 1fr; align-items: start; } }

/* small pieces a say card can use */
.tutor { display: grid; gap: 8px; margin: 8px 0; }
.tutor p { margin: 0; background: var(--soft); border-radius: 4px 16px 16px 16px; padding: 9px 13px; font-size: 17px; line-height: 1.65; }
.vs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.vs2 > div { border-radius: 14px; padding: 9px 11px; font-size: 15.5px; line-height: 1.55; }
.vs2 > div b { display: block; font-size: 16px; }
.vs2 .a { background: var(--sky-bg); } .vs2 .a b { color: var(--sky); }
.vs2 .b { background: var(--peach-bg); } .vs2 .b b { color: var(--peach); }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.chain span { background: var(--soft); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 11px; font-weight: 700; font-size: 15.5px; }
.chain i { font-style: normal; color: var(--muted); }
.say-card svg { max-width: 100%; height: auto; }
.say-card .fig { background: #fdf6e8; border-radius: 14px; padding: 6px; margin: 8px 0; } .say-card .fig svg { display: block; max-width: 420px; width: 100%; margin: 0 auto; }
