/* ==========================================================
   Class 7 Science · Section 1 · নিম্নশ্রেণির জীব
   Theme: "অণুজীব অভিযাত্রী — ল্যাব নোটবুক" (age ~12)
   ========================================================== */
:root {
  --ink: #0b1f24;
  --ink-2: #0f2a31;
  --ink-3: #143740;
  --teal: #2ee6c5;
  --teal-d: #14b89c;
  --cream: #fff8e7;
  --cream-2: #f3e9cf;
  --amber: #ffb547;
  --coral: #ff6b6b;
  --green: #7bd96a;
  --violet: #b48ad6;
  --text: #e8f4f1;
  --text-dim: #a9c4be;
  --paper-text: #1f2b2a;
  --line: rgba(46, 230, 197, .22);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .6);
}

body { background: var(--ink); color: var(--text); }
::selection { background: var(--teal); color: var(--ink); }
a { color: var(--teal); }
strong { color: #fff; font-weight: 700; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: var(--ink); padding: .5rem 1rem; border-radius: var(--r-sm); z-index: 2000; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .55rem var(--gutter);
  background: rgba(11, 31, 36, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.crumbs { display: flex; gap: .5rem; color: var(--text-dim); }
.crumbs [aria-current] { color: var(--teal); font-weight: 600; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--teal); text-decoration: underline; }
.badges { display: flex; align-items: center; gap: .6rem; }
.badges-label { color: var(--text-dim); }
.badges ol { display: flex; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.badges li {
  width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink-3); border: 1px dashed var(--line); filter: grayscale(1) opacity(.45);
  transition: filter .4s, transform .4s, background .4s; font-size: 1rem;
}
.badges li.earned { filter: none; background: rgba(46, 230, 197, .16); border: 1px solid var(--teal); animation: pop .6s; }
@keyframes pop { 40% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
@media (max-width: 560px) { .badges-label { display: none; } .badges li { width: 1.7rem; height: 1.7rem; font-size: .85rem; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92vh, 820px); display: grid; align-items: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 70% 20%, #16444b 0%, var(--ink) 60%); }
#microbe-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.lens-ring { position: absolute; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; z-index: -1;
  border: 10px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 2px rgba(46, 230, 197, .4) inset, 0 0 60px rgba(46, 230, 197, .2);
  transform: translate(-50%, -50%); left: 70%; top: 45%; transition: opacity .3s; }
.hero-inner { padding-block: var(--sp-9); max-width: 46rem; margin-left: max(var(--gutter), calc((100vw - var(--content-w)) / 2)); }
.eyebrow { color: var(--teal); letter-spacing: .02em; font-weight: 600; margin-bottom: var(--sp-3); }
.hero h1 { font-size: var(--fs-3xl); line-height: 1.25; margin-bottom: var(--sp-4);
  background: linear-gradient(100deg, #fff 30%, var(--teal) 70%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(46, 230, 197, .15); }
.hero-sub { font-size: var(--fs-lg); color: var(--text-dim); max-width: 36rem; }
.hero-hint { margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--text-dim); }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.5rem; border-radius: var(--r-full); border: 0; font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-glow { background: var(--teal); color: var(--ink); box-shadow: 0 0 0 0 rgba(46, 230, 197, .6); animation: glow 2.4s infinite; }
@keyframes glow { 70% { box-shadow: 0 0 0 18px rgba(46, 230, 197, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 230, 197, 0); } }
.btn-small { padding: .5rem 1.1rem; background: var(--teal); color: var(--ink); }

/* ---------- generic blocks ---------- */
.block { padding-block: var(--sp-8); }
.lesson-part.alt { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-block: 1px solid var(--line); }
.block h2 { font-size: var(--fs-2xl); }
.part-tag { display: inline-block; padding: .15rem .9rem; border-radius: var(--r-full); border: 1px solid var(--teal); color: var(--teal); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.kicker-title { font-size: var(--fs-xl) !important; }
.kicker { display: inline-block; background: var(--amber); color: var(--ink); border-radius: var(--r-sm); padding: 0 .6rem; margin-inline-end: .5rem; font-size: .8em; transform: rotate(-3deg); }
.sub-title { font-size: var(--fs-xl); margin-top: var(--sp-7); color: var(--cream); }
.two-col { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.05fr .95fr; } }
.muted { color: var(--text-dim); }
.small { font-size: var(--fs-sm); }
.note { color: var(--text-dim); border-inline-start: 3px solid var(--amber); padding-inline-start: 1rem; margin-top: var(--sp-5); }
.new-words { margin-top: var(--sp-5); color: var(--text-dim); }
.new-words b { color: var(--amber); }

.remember { position: relative; margin-top: var(--sp-5); padding: 1.1rem 1.3rem 1.1rem 1.3rem; border-radius: var(--r-md);
  background: rgba(46, 230, 197, .08); border: 1px solid rgba(46, 230, 197, .35); }
.remember b:first-child { display: inline-block; background: var(--teal); color: var(--ink); padding: 0 .6rem; border-radius: var(--r-sm); margin-inline-end: .5rem; font-size: var(--fs-sm); }
.remember.warn { background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .45); }
.remember.warn b:first-child { background: var(--coral); }
.remember.big { font-size: var(--fs-lg); align-self: center; }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- outcomes ---------- */
.mission-grid { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.mission-grid li { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; line-height: 1.6; }
.mission-grid span { display: block; font-weight: 800; color: var(--teal); font-size: var(--fs-lg); }

/* ---------- story ---------- */
.story-card { display: grid; gap: 1.5rem; background: var(--cream); color: var(--paper-text); border-radius: var(--r-lg); padding: clamp(1.3rem, 4vw, 2.5rem); box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(transparent 0 2.1rem, rgba(30, 80, 120, .12) 2.1rem calc(2.1rem + 1px)); position: relative; }
.story-card::before { content: ""; position: absolute; inset: 0 auto 0 2.2rem; width: 2px; background: rgba(255, 107, 107, .4); }
.story-card strong { color: #0b5b4e; }
.story-card h2 { font-size: var(--fs-xl); color: #12423b; }
.story-art { font-size: 4.5rem; line-height: 1; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }
@media (min-width: 760px) { .story-card { grid-template-columns: auto 1fr; padding-left: 3.5rem; } }
.intro-text { margin-top: var(--sp-6); font-size: var(--fs-lg); }

/* ---------- microscope zoom ---------- */
.scope { margin: 0; }
.scope-view { max-width: 400px; margin-inline: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5)); }
.scope .lvl { opacity: 0; transition: opacity .6s, transform .6s; transform-origin: 200px 200px; transform: scale(.6); }
.scope .lvl.on { opacity: 1; transform: scale(1); }
.scope .phage { animation: phageBob 3s ease-in-out infinite; }
.scope-slider { display: block; max-width: 420px; margin: 1rem auto 0; }
.scope-slider input { width: 100%; accent-color: var(--teal); }
.ticks { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-dim); gap: .5rem; }
.ticks span:nth-child(2) { text-align: center; } .ticks span:last-child { text-align: end; }
.scope figcaption { text-align: center; margin-top: .8rem; min-height: 3.5em; color: var(--cream); }

/* ---------- kingdoms ---------- */
.kingdom { margin-top: var(--sp-5); text-align: center; }
.kingdom-root { display: inline-block; padding: .6rem 1.6rem; border-radius: var(--r-full); background: var(--amber); color: var(--ink); font-weight: 700; }
.kingdom-lines { height: 34px; margin: 0 auto; width: 70%; border: 2px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; position: relative; top: 14px; }
.kingdom-lines::before { content: ""; position: absolute; left: 50%; top: -16px; height: 16px; border-left: 2px solid var(--line); }
.kingdom-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 14px; }
.k-btn { background: var(--ink-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--r-md); padding: .8rem .4rem; font-weight: 700; font-size: var(--fs-base); transition: all .25s; }
.k-btn small { display: block; font-weight: 400; color: var(--text-dim); font-size: .8rem; }
.k-btn[aria-selected="true"] { background: var(--teal); color: var(--ink); border-color: var(--teal); transform: translateY(-4px); box-shadow: 0 10px 30px -10px var(--teal); }
.k-btn[aria-selected="true"] small { color: var(--ink-3); }
.k-panel { margin-top: 1rem; text-align: start; background: var(--cream); color: var(--paper-text); border-radius: var(--r-md); padding: 1.2rem 1.4rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; animation: fadeUp .45s; }
.k-panel strong { color: #0b5b4e; }
.k-panel .k-emoji { font-size: 3rem; }
.k-panel h4 { margin: 0 0 .3rem; font-size: var(--fs-lg); color: #12423b; }
.k-panel p { margin: 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* ---------- virus ---------- */
.phage-box { margin: 0; }
.phage3d { position: relative; height: 380px; border-radius: var(--r-lg); background: radial-gradient(circle at 50% 40%, #1b4a52, #08171b 75%); border: 1px solid var(--line); overflow: hidden; touch-action: none; }
.phage3d canvas { width: 100% !important; height: 100% !important; }
.phage-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-dim); }
.phage-parts, .am-labels { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.phage-parts button, .am-labels button { background: var(--ink-3); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-full); padding: .3rem .9rem; font-size: var(--fs-sm); transition: all .2s; }
.phage-parts button.on, .am-labels button.on { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.phage-box figcaption, .amoeba-fig figcaption { margin-top: .7rem; color: var(--text-dim); font-size: var(--fs-sm); min-height: 3em; }

.alive { margin-top: var(--sp-7); display: grid; gap: var(--sp-5); align-items: center; background: var(--ink-3); border-radius: var(--r-lg); padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); }
@media (min-width: 860px) { .alive { grid-template-columns: 1.2fr .8fr; } }
.alive h3 { color: var(--amber); font-size: var(--fs-lg); }
.switch { display: flex; align-items: center; gap: .8rem; margin: .7rem 0; cursor: pointer; line-height: 1.5; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { flex: none; width: 3.2rem; height: 1.8rem; border-radius: 999px; background: #3b5157; position: relative; transition: background .3s; }
.switch .slider::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #fff; transition: transform .3s; }
.switch input:checked + .slider { background: var(--teal); }
.switch input:checked + .slider::after { transform: translateX(1.4rem); }
.switch input:focus-visible + .slider { box-shadow: var(--focus-ring); }
.alive-status { font-weight: 700; padding: .7rem 1rem; border-radius: var(--r-md); margin-top: 1rem; background: rgba(255, 255, 255, .06); }
.alive-status.alive-yes { color: var(--green); background: rgba(123, 217, 106, .12); }
.alive-status.alive-no { color: var(--coral); background: rgba(255, 107, 107, .1); }
.alive-art { width: 100%; max-width: 320px; margin-inline: auto; }
.alive-art .host { fill: rgba(123, 217, 106, .12); stroke: var(--green); stroke-width: 3; stroke-dasharray: 10 8; opacity: 0; transition: opacity .5s; }
.alive-art .host-label { fill: var(--green); font-size: 16px; opacity: 0; transition: opacity .5s; font-family: var(--bn-font); }
.alive-art.in-host .host, .alive-art.in-host .host-label { opacity: 1; }
.alive-art .coat { fill: rgba(167, 243, 228, .25); stroke: var(--teal); stroke-width: 4; }
.alive-art .na { fill: none; stroke: var(--amber); stroke-width: 4; stroke-linecap: round; }
.alive-art .coat-g, .alive-art .na-g { transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: center; }
.alive-art.split .coat-g { transform: translateX(-60px) rotate(-12deg); }
.alive-art.split .na-g { transform: translateX(80px) rotate(20deg); }
.alive-art .sparks circle { fill: var(--green); opacity: 0; }
.alive-art.living .sparks circle { animation: spark 1.4s infinite; }
.alive-art.living .sparks circle:nth-child(2) { animation-delay: .35s; } .alive-art.living .sparks circle:nth-child(3) { animation-delay: .7s; } .alive-art.living .sparks circle:nth-child(4) { animation-delay: 1.05s; }
.alive-art.living .coat-g { animation: pulse 1.6s ease-in-out infinite; }
@keyframes spark { 0% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes pulse { 50% { transform: scale(1.06); } }
.alive-art.dead { filter: grayscale(1) opacity(.6); }

.shape-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.shape-gallery figure { margin: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; text-align: center; transition: transform .3s; }
.shape-gallery figure:hover { transform: translateY(-6px) rotate(-1deg); }
.shape-gallery svg { width: 100px; height: 100px; margin-inline: auto; animation: floaty 5s ease-in-out infinite; }
.shape-gallery figure:nth-child(2) svg { animation-delay: -1.2s; } .shape-gallery figure:nth-child(3) svg { animation-delay: -2.4s; } .shape-gallery figure:nth-child(4) svg { animation-delay: -3.6s; }
.v-body { fill: rgba(46, 230, 197, .2); stroke: var(--teal); stroke-width: 3; }
.v-spikes line, .v-lines { stroke: var(--teal); stroke-width: 3; fill: none; stroke-linecap: round; }
@keyframes floaty { 50% { transform: translateY(-7px) rotate(4deg); } }
@keyframes phageBob { 50% { transform: translateY(-6px); } }

.duo { display: grid; gap: 1rem; margin-top: var(--sp-6); }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo-card { border-radius: var(--r-lg); padding: 1.3rem 1.5rem; border: 1px solid; }
.duo-card h3 { font-size: var(--fs-lg); }
.duo-card ul { margin: 0; padding-inline-start: 1.2rem; }
.duo-card li { margin-bottom: .45rem; }
.duo-card.good { background: rgba(123, 217, 106, .08); border-color: rgba(123, 217, 106, .4); }
.duo-card.good h3 { color: var(--green); }
.duo-card.bad { background: rgba(255, 107, 107, .07); border-color: rgba(255, 107, 107, .4); }
.duo-card.bad h3 { color: var(--coral); }

/* ---------- bacteria ---------- */
.hooke-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--cream); color: var(--paper-text); padding: 1.2rem 1.4rem; border-radius: var(--r-lg); transform: rotate(1.2deg); box-shadow: var(--shadow); }
.hooke-card b { color: #b5521b; }
.hooke-card p { margin: 0; }
.hooke-icon { font-size: 2.6rem; }
.bact-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: var(--sp-6); }
.bact { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; }
.bact h3 { color: var(--amber); margin: .5rem 0 .3rem; font-size: var(--fs-lg); }
.bact p { margin: 0; color: var(--text-dim); }
.bact p b { color: var(--text); }
.b-svg { width: 120px; height: 120px; background: radial-gradient(circle, #fdf6dc 0 60%, #e8dcb3 61% 64%, transparent 65%); border-radius: 50%; }
.b-svg circle, .b-svg rect { fill: #b48ad6; }
.b-coccus circle { fill: #e08ab0; animation: jiggle 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.b-coccus circle:nth-child(2n) { animation-delay: -.7s; }
.b-bacillus rect { animation: drift 3.5s ease-in-out infinite; transform-box: fill-box; }
.b-comma path { fill: none; stroke: #6c8fd6; stroke-width: 9; stroke-linecap: round; animation: wig 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.b-comma path.flag { stroke-width: 2; }
.b-spiral path { fill: none; stroke: #d98b3a; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 12 6; animation: slither 1.5s linear infinite; }
@keyframes jiggle { 50% { transform: scale(1.12); } }
@keyframes drift { 50% { transform: translateX(6px); } }
@keyframes wig { 50% { transform: rotate(8deg); } }
@keyframes slither { to { stroke-dashoffset: -36; } }

.game { margin-top: var(--sp-7); background: linear-gradient(135deg, #19434a, #10292f); border: 1px solid var(--teal); border-radius: var(--r-lg); padding: clamp(1.2rem, 3vw, 2rem); }
.game h3 { color: var(--teal); font-size: var(--fs-lg); }
.match { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1rem; }
.match-col { display: grid; gap: .6rem; align-content: start; }
.m-item { background: var(--ink); border: 2px solid var(--line); color: var(--text); border-radius: var(--r-md); padding: .6rem .8rem; text-align: start; transition: all .2s; display: flex; align-items: center; gap: .6rem; min-height: 4rem; line-height: 1.45; font-size: var(--fs-sm); }
.m-item svg { width: 48px; height: 48px; flex: none; }
.m-item.sel { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 181, 71, .3); }
.m-item.ok { border-color: var(--green); background: rgba(123, 217, 106, .12); cursor: default; }
.m-item.shake { animation: shake .4s; border-color: var(--coral); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.match-status { margin-top: 1rem; font-weight: 600; min-height: 1.8em; color: var(--amber); }

/* ---------- fungi / algae ---------- */
.vs { display: grid; gap: 1rem; align-items: stretch; }
@media (min-width: 900px) { .vs { grid-template-columns: 1fr auto 1fr; } }
.vs-card { border-radius: var(--r-lg); padding: 1.4rem; color: var(--paper-text); box-shadow: var(--shadow); }
.vs-card strong { color: inherit; }
.vs-card.fungus { background: #f6e6d4; }
.vs-card.alga { background: #e2f4d9; }
.vs-head { display: flex; align-items: center; gap: .7rem; }
.vs-head span { font-size: 2.4rem; }
.vs-head h3 { margin: 0; font-size: var(--fs-xl); }
.vs-mid { align-self: center; justify-self: center; background: var(--amber); color: var(--ink); font-weight: 800; padding: .5rem 1rem; border-radius: var(--r-full); }
.feed-type { display: grid; gap: .6rem; }
.feed-type div { background: rgba(255, 255, 255, .6); border-radius: var(--r-md); padding: .7rem .9rem; line-height: 1.6; }
.feed-type b { display: block; color: #8a4513; }
.spiro { margin-top: .8rem; }
.spiro rect { fill: #c7ecb5; stroke: #4c9a3e; stroke-width: 2; }
.spiro path { fill: none; stroke: #2a7d27; stroke-width: 4; stroke-dasharray: 600; animation: draw 4s ease-in-out infinite alternate; }
@keyframes draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }

.flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .9rem; }
.flip { position: relative; height: 10.5rem; border: 0; padding: 0; background: none; perspective: 900px; color: inherit; text-align: center; }
.flip span { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; border-radius: var(--r-md); backface-visibility: hidden; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); line-height: 1.5; }
.f-front { background: var(--ink-3); border: 1px solid var(--line); font-size: var(--fs-lg); font-weight: 700; }
.f-back { background: var(--cream); color: var(--paper-text); transform: rotateY(180deg); font-size: .98rem; align-content: center; }
.f-back b { display: block; color: #0b7a63; font-size: .85rem; }
.flip.bad .f-back b { color: #c0392b; }
.flip.bad .f-front { border-color: rgba(255, 107, 107, .45); }
.flip[aria-pressed="true"] .f-front { transform: rotateY(-180deg); }
.flip[aria-pressed="true"] .f-back { transform: rotateY(0); }

.shield { margin-top: var(--sp-6); background: var(--ink-3); border-radius: var(--r-lg); padding: 1.4rem 1.6rem; border-inline-start: 6px solid var(--teal); }
.shield h3 { color: var(--teal); }
.shield-list { margin: 0; padding-inline-start: 1.3rem; }
.shield-list li { margin-bottom: .4rem; }

/* ---------- amoeba ---------- */
.amoeba-fig { margin: 0; }
#amoeba-svg { width: 100%; background: radial-gradient(circle, #fdf6dc 0 62%, #e8dcb3 63% 66%, transparent 67%); border-radius: 50%; aspect-ratio: 420 / 340; }
.am-body { fill: rgba(140, 190, 240, .45); stroke: #3c78b5; stroke-width: 3; transition: stroke .3s, stroke-width .3s; }
.am-ecto { fill: none; stroke: rgba(60, 120, 181, .35); stroke-width: 10; }
.am-part { transition: transform .3s, stroke .3s; transform-box: fill-box; transform-origin: center; stroke: transparent; stroke-width: 4; }
.am-nucleus { fill: #5f86c9; }
.am-food { fill: #8fbf6a; }
.am-cv { fill: #e9f6ff; stroke: #7fb2e5; stroke-width: 2; animation: contract 3s ease-in-out infinite; }
.am-wv { fill: #cfe6ff; }
@keyframes contract { 0%, 70% { transform: scale(1); } 85% { transform: scale(.25); } }
.am-part.hl { stroke: var(--coral); stroke-width: 5; transform: scale(1.18); }
.am-body.hl { stroke: var(--coral); stroke-width: 6; }

.entamoeba { margin-top: var(--sp-7); }
.entamoeba h3 { font-size: var(--fs-xl); color: var(--amber); }
.sporu { display: grid; gap: 1.2rem; margin-top: 1rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; }
@media (min-width: 860px) { .sporu { grid-template-columns: 1fr 1fr; align-items: center; } }
.sporu-stage { background: #fdf6dc; border-radius: var(--r-md); }
.sporu h4 { color: var(--teal); margin-bottom: .6rem; }
.sporu-steps { padding: 0; margin: 0 0 1rem; list-style: none; counter-reset: s; display: grid; gap: .45rem; }
.sporu-steps button { width: 100%; text-align: start; background: var(--ink); border: 1px solid var(--line); color: var(--text-dim); border-radius: var(--r-md); padding: .55rem .8rem; display: flex; gap: .6rem; line-height: 1.45; }
.sporu-steps li { counter-increment: s; }
.sporu-steps button::before { content: counter(s, bengali); font-weight: 800; color: var(--teal); }
.sporu-steps button.on { border-color: var(--teal); color: var(--text); background: rgba(46, 230, 197, .1); }

/* ---------- video player ---------- */
.video-block { background: #061215; border-block: 1px solid var(--line); }
.player { background: #000; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(46, 230, 197, .35); border: 1px solid var(--line); }
.stage { position: relative; aspect-ratio: 16 / 9; background: #0e2a30; }
#scene { width: 100%; height: 100%; font-family: var(--bn-font); }
.big-play { position: absolute; inset: 0; margin: auto; width: 5.5rem; height: 5.5rem; border-radius: 50%; border: 0; background: var(--teal); color: var(--ink); font-size: 2.2rem; box-shadow: 0 0 0 14px rgba(46, 230, 197, .2); transition: transform .2s, opacity .3s; }
.big-play:hover { transform: scale(1.08); }
.big-play.hide { opacity: 0; pointer-events: none; }
.caption { margin: 0; padding: .9rem 1.2rem; background: #0b1f24; color: #fff; font-size: var(--fs-lg); min-height: 4.4em; line-height: 1.6; border-top: 1px solid var(--line); }
.controls { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: #0b1f24; }
.ctrl { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-3); color: var(--text); font-size: 1.1rem; flex: none; }
#scrub { flex: 1; accent-color: var(--teal); min-width: 0; }
.time { font-size: var(--fs-sm); color: var(--text-dim); min-width: 3.2em; text-align: end; }
.chapters { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: .4rem 1rem 1rem; background: #0b1f24; }
.chapters button { background: transparent; border: 1px solid var(--line); color: var(--text-dim); border-radius: var(--r-full); padding: .15rem .8rem; font-size: .9rem; }
.chapters button.on { background: var(--teal); color: var(--ink); border-color: var(--teal); }

/* ---------- health ---------- */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .9rem; }
.routes article { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; transition: transform .3s, border-color .3s; }
.routes article:hover { transform: translateY(-5px); border-color: var(--coral); }
.routes span { font-size: 2.2rem; }
.routes h3 { margin: .3rem 0; color: var(--coral); font-size: var(--fs-lg); }
.routes p { margin: 0; color: var(--text-dim); line-height: 1.65; }

.sorter-card { min-height: 7rem; display: grid; place-items: center; text-align: center; background: var(--cream); color: var(--paper-text); border-radius: var(--r-lg); padding: 1.2rem; font-size: var(--fs-lg); font-weight: 700; margin: 1rem 0; box-shadow: var(--shadow); }
.sorter-card.fly-safe { animation: flyR .45s forwards; } .sorter-card.fly-risk { animation: flyL .45s forwards; }
@keyframes flyR { to { transform: translateX(40%) rotate(10deg); opacity: 0; } }
@keyframes flyL { to { transform: translateX(-40%) rotate(-10deg); opacity: 0; } }
.sorter-btns { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.btn-safe { background: var(--green); color: var(--ink); }
.btn-risk { background: var(--coral); color: var(--ink); }
.sorter-meter { height: 8px; background: var(--ink); border-radius: 99px; margin-top: 1.2rem; overflow: hidden; }
.sorter-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--green)); transition: width .4s; }
.sorter-feedback { margin-top: .8rem; min-height: 3.2em; color: var(--text); }

/* ---------- chart / table ---------- */
.chart-card { background: var(--cream); color: var(--paper-text); border-radius: var(--r-lg); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow); }
.chart-card h3 { color: #12423b; font-size: var(--fs-lg); }
.chart-card .muted { color: #5c6b68; }
.chart-wrap { position: relative; height: 340px; }
.chart-detail { margin: 1rem 0 0; padding: .8rem 1rem; background: #fff; border-radius: var(--r-md); min-height: 3.2em; }
.table-scroll { overflow-x: auto; margin-top: var(--sp-6); border-radius: var(--r-lg); border: 1px solid var(--line); }
.cmp { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .98rem; line-height: 1.55; }
.cmp caption { text-align: start; padding: 1rem 1.2rem; font-weight: 700; color: var(--amber); font-size: var(--fs-lg); }
.cmp th, .cmp td { padding: .75rem .9rem; border-top: 1px solid var(--line); vertical-align: top; text-align: start; }
.cmp thead th { background: var(--ink-3); color: var(--teal); }
.cmp tbody th { color: var(--amber); white-space: nowrap; }
.cmp tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }

/* ---------- activity ---------- */
.lab { display: grid; gap: var(--sp-5); align-items: center; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.2rem, 3vw, 2rem); margin-bottom: var(--sp-5); }
@media (min-width: 860px) { .lab { grid-template-columns: 1.1fr .9fr; } }
.lab h3, .lab-mini h3 { color: var(--amber); font-size: var(--fs-lg); }
.day-slider { display: block; margin-top: 1rem; }
.day-slider input { width: 100%; accent-color: var(--amber); }
.day-note { min-height: 3.4em; background: rgba(255, 181, 71, .08); border-radius: var(--r-md); padding: .7rem 1rem; }
.bread { max-width: 300px; margin-inline: auto; width: 100%; }
.bread .crust { fill: #c98a45; } .bread .crumb { fill: #f6e3b4; }
.mould-spot { transition: r .6s, fill .6s, opacity .6s; }
.survey-form { display: grid; gap: .7rem; }
.survey-form label { display: grid; gap: .2rem; }
.survey-form input { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .8rem; color: var(--text); max-width: 12rem; }
.survey-msg { min-height: 1.8em; color: var(--amber); margin-top: .6rem; }
.survey-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.survey-charts figure { margin: 0; text-align: center; background: var(--cream); color: var(--paper-text); border-radius: var(--r-md); padding: .8rem; }
.survey-charts canvas { max-height: 180px; }
.survey-charts figcaption { font-size: .9rem; margin-top: .4rem; }
.lab-mini { border: 1px dashed var(--amber); border-radius: var(--r-lg); padding: 1.2rem 1.4rem; }

/* ---------- quiz ---------- */
.score-pill { position: sticky; top: 4rem; z-index: 5; display: inline-block; float: right; background: var(--amber); color: var(--ink); font-weight: 700; padding: .3rem 1rem; border-radius: var(--r-full); }
.mcq { display: grid; gap: 1rem; clear: both; }
.lk-q { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.2rem 1.2rem; margin: 0; background: var(--ink-2); }
.lk-q-stem { font-weight: 700; line-height: 1.7; }
.lk-q-num { color: var(--teal); }
.lk-opts { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: .5rem; }
.lk-opt { display: flex; gap: .7rem; align-items: center; text-align: start; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: .55rem .8rem; color: var(--text); transition: all .2s; line-height: 1.5; }
.lk-opt:hover:not([aria-disabled]) { border-color: var(--teal); }
.lk-opt-key { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); flex: none; font-weight: 700; }
.lk-opt.is-right { border-color: var(--green); background: rgba(123, 217, 106, .15); }
.lk-opt.is-wrong { border-color: var(--coral); background: rgba(255, 107, 107, .12); }
.lk-opt[aria-disabled] { cursor: default; }
.lk-explain { margin: .8rem 0 0; padding: .6rem .9rem; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); line-height: 1.6; }
.lk-explain.ok { color: var(--green); } .lk-explain.no { color: #ffb0a8; }
.mcq-stem-list { margin: .3rem 0 .3rem; padding-inline-start: 2.2rem; font-weight: 400; }

.qa details, .cq-parts details { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: .7rem 1rem; margin-bottom: .6rem; }
.qa summary, .cq-parts summary { cursor: pointer; font-weight: 600; line-height: 1.6; }
.qa summary::marker, .cq-parts summary::marker { color: var(--teal); }
.qa details[open], .cq-parts details[open] { border-color: var(--teal); }
.qa details p, .cq-parts details p { margin: .6rem 0 0; color: var(--text-dim); }
.cq { background: var(--ink-3); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; margin-bottom: 1.2rem; border: 1px solid var(--line); }
.cq-stem b { color: var(--amber); }
.cq-figs { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cq-figs figure { margin: 0; flex: 1 1 12rem; max-width: 16rem; text-align: center; }
.cq-figs svg { border-radius: var(--r-sm); background: #fff; }
.cq-parts { list-style: none; padding: 0; margin: 0; }

/* ---------- summary / footer ---------- */
.summary { background: linear-gradient(135deg, var(--teal), var(--green)); color: var(--ink); border-radius: var(--r-xl); padding: clamp(1.5rem, 4vw, 3rem); }
.summary h2 { font-size: var(--fs-xl); }
.summary strong { color: inherit; }
.summary ul { margin: 0; padding-inline-start: 1.3rem; columns: 2 22rem; column-gap: 2.5rem; }
.summary li { margin-bottom: .5rem; break-inside: avoid; font-weight: 500; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: var(--sp-6) var(--sp-4); }
.pager-btn { border: 1px solid var(--line); border-radius: var(--r-full); padding: .6rem 1.2rem; color: var(--text); text-decoration: none; }
.pager-btn.disabled { color: var(--text-dim); opacity: .7; }
.credit { font-size: .9rem; color: var(--text-dim); padding-bottom: var(--sp-6); }

@media (max-width: 640px) {
  .match { grid-template-columns: 1fr; }
  .phage3d { height: 320px; }
  .score-pill { float: none; }
  .kingdom-lines { width: 75%; }
  .big-play { width: 3.6rem; height: 3.6rem; font-size: 1.4rem; box-shadow: 0 0 0 8px rgba(46, 230, 197, .2); }
  .caption { font-size: var(--fs-base); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- sprite icons (replace emoji) ---------- */
.badges li .ic { width: 1.25rem; height: 1.25rem; vertical-align: 0; }
.story-art .ic-xl { width: 5.5rem; height: 5.5rem; }
.vs-head .ic-lg { width: 2.8rem; height: 2.8rem; }
.routes .ic-lg { width: 3.6rem; height: 3.6rem; display: block; margin-bottom: .2rem; }
.k-panel .k-emoji .ic-xl { width: 3.6rem; height: 3.6rem; }
.f-front { align-content: center; gap: .35rem; }
.f-front .ic { width: 3.6rem; height: 3.6rem; }
.big-play .ic { width: 2.2rem; height: 2.2rem; margin-left: .25rem; vertical-align: 0; }
.ctrl { display: grid; place-items: center; }
.ctrl .ic { width: 1.1rem; height: 1.1rem; vertical-align: 0; }
.sorter-card .ic-lg { vertical-align: middle; margin-inline-end: .3rem; }
.hero-hint .ic, .lk-explain .ic, .alive-status .ic { width: 1.35em; height: 1.35em; }
@media (max-width: 640px) { .big-play .ic { width: 1.5rem; height: 1.5rem; } }
