/* ==========================================================
   Class 7 Agriculture · Section 5 · কৃষিজ উৎপাদন
   Theme: "বীজ-প্যাকেটের তাক" — the page is a farm-shop shelf of
   instruction packets. Every card is a printed seed packet: a
   crimped zig-zag seal on top, a coloured label band, halftone
   print dots, and a "প্যাকেটের পেছনে" spec grid like the back of
   a real seed packet. Shelves are colour coded: maize yellow
   (ফসল), marigold orange (ফুল-ফল), lagoon blue (মাছ), lime
   (মুরগি), clay (ছাগল), bottle green ledger (হিসাব).
   Topbar = packet header strip with a crimp edge; badge = a
   seed packet whose clear window fills with seeds per task.
   Band কৌতূহলী (12–13).
   ========================================================== */
:root {
  --bg: #f5f2e4;
  --card: #fffef8;
  --ink: #17301f;
  --ink-2: #4f6152;
  --bottle: #1d4a33;
  --bottle-d: #12321f;
  --bottle-s: #dcebdf;
  --maize: #f2b31b;
  --maize-d: #9a6c00;
  --maize-s: #fdf0c8;
  --mari: #e8661a;
  --mari-d: #a8420a;
  --mari-s: #fde3cf;
  --lagoon: #1f7a9c;
  --lagoon-d: #135672;
  --lagoon-s: #d8eef5;
  --lime: #7fb53a;
  --lime-d: #4d7a17;
  --lime-s: #e9f4d6;
  --clay: #9a5b3c;
  --clay-d: #6c3a22;
  --clay-s: #f3e1d6;
  --line: #ddd6b8;
  --ok: #2f7a2a;
  --no: #c0392b;
  --no-s: #fadcd6;
  --tone: var(--maize);
  --tone-d: var(--maize-d);
  --tone-s: var(--maize-s);
}
* { box-sizing: border-box; }
body {
  color: var(--ink);
  background:
    radial-gradient(circle, rgba(29, 74, 51, .07) 1.3px, transparent 1.6px) 0 0 / 14px 14px,
    var(--bg);
}
::selection { background: rgba(242, 179, 27, .45); }
a { color: var(--lagoon-d); }
strong { color: var(--bottle); }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 2000; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--content-w); margin-inline: auto; padding-inline: var(--gutter); }
main, .wrap, .lesson-part > *, .exp-grid > *, .row-ctrl > *, .acct-grid > *, .sys-grid > *, .match > *, .bins > *, .dose-grid > *, .spec > * { min-width: 0; }

/* shelf tones */
.t-crop { --tone: var(--maize); --tone-d: var(--maize-d); --tone-s: var(--maize-s); }
.t-flower { --tone: var(--mari); --tone-d: var(--mari-d); --tone-s: var(--mari-s); }
.t-fruit { --tone: #d9832a; --tone-d: #8f4d0d; --tone-s: #fbe8d2; }
.t-acct { --tone: var(--bottle); --tone-d: var(--bottle-d); --tone-s: var(--bottle-s); }
.t-fish { --tone: var(--lagoon); --tone-d: var(--lagoon-d); --tone-s: var(--lagoon-s); }
.t-hen { --tone: var(--lime); --tone-d: var(--lime-d); --tone-s: var(--lime-s); }
.t-goat { --tone: var(--clay); --tone-d: var(--clay-d); --tone-s: var(--clay-s); }

/* top bar = packet header strip with crimp */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding: .45rem var(--gutter) .6rem; font-size: var(--fs-sm); color: #e9f1e4; background: var(--bottle); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; background: linear-gradient(135deg, var(--maize) 50%, transparent 50%) 0 0 / 14px 10px repeat-x, linear-gradient(225deg, var(--maize) 50%, transparent 50%) 0 0 / 14px 10px repeat-x; }
.crumbs { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.crumbs a { color: #cfe2d3; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: var(--maize); font-weight: 700; }
.level { display: flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--maize); }
.pack-badge { width: 2.1rem; height: 2.4rem; overflow: visible; }
.level.pop .pack-badge { animation: shakepack .6s; }
@keyframes shakepack { 25% { transform: rotate(-9deg); } 60% { transform: rotate(7deg); } }

/* hero */
.hero { position: relative; padding: clamp(2.2rem, 4vw, 3.2rem) 0 2rem; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1.1fr; } }
.eyebrow { display: inline-block; color: var(--ink); background: var(--maize); font-weight: 800; padding: .1rem 1rem; border-radius: 999px; font-size: var(--fs-sm); border: 2px solid var(--ink); }
h1 { font-size: var(--fs-3xl); line-height: 1.3; margin: .8rem 0 1rem; color: var(--bottle); }
.lede { font-size: var(--fs-lg); line-height: 1.75; }
.hint { color: var(--ink-2); border-left: 5px solid var(--mari); padding-left: .8rem; }
.hero-fig { margin: 0; background: #fff; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 0 -4px var(--maize), 0 14px 26px rgba(23, 48, 31, .18); }
.hero-fig > svg { display: block; width: 100%; height: auto; }
#hero-svg .pk { cursor: pointer; }
#hero-svg .pk:focus-visible .pk-body, #hero-svg .pk.on .pk-body { stroke: var(--mari); stroke-width: 5; }
.hero-read { margin: 0; padding: .55rem 1rem; background: var(--bottle); color: #f4f8ee; font-weight: 700; min-height: 3.3em; }

/* blocks */
.block { padding-block: clamp(1.6rem, 4vw, 3rem); }
.sec-title, .lesson-part h2, #video h2, #compare h2, #quiz h2, .story h2, .summary h2 { font-size: var(--fs-2xl); line-height: 1.4; margin: .4rem 0 1rem; color: var(--bottle); }
.story h2 { font-size: var(--fs-xl); }
.sub-title { font-size: var(--fs-xl); margin: 2rem 0 .8rem; color: var(--tone-d, var(--bottle)); }
.part-tag { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 800; color: var(--ink); font-size: var(--fs-sm); background: var(--tone); padding: .05rem .9rem .05rem .6rem; border-radius: 999px; border: 2px solid var(--ink); }
.t-acct .part-tag, .t-fish .part-tag, .t-goat .part-tag, #video .part-tag { color: #fff; }
.part-tag::before { content: ''; width: .7rem; height: .7rem; border-radius: 50% 50% 50% 0; background: #fff; border: 2px solid var(--ink); transform: rotate(-45deg); }
.goals { display: grid; gap: .6rem; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.goals li { background: var(--card); padding: .7rem 1rem .7rem 2.7rem; border: 2px solid var(--ink); border-radius: 10px; position: relative; }
.goals li::before { content: ''; position: absolute; left: .9rem; top: 1.05rem; width: .8rem; height: 1.05rem; border-radius: 50%; background: var(--maize); border: 2px solid var(--ink); }

/* shelf nav + shelf headers */
.shelf-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.shelf-nav a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: var(--fs-sm); padding: .15rem .8rem; border: 2px solid var(--ink); border-radius: 6px 6px 0 0; border-bottom-width: 5px; background: #fff; }
.shelf-nav a:hover { transform: translateY(-2px); }
.sn-crop { border-bottom-color: var(--maize) !important; } .sn-flower { border-bottom-color: var(--mari) !important; } .sn-fruit { border-bottom-color: #d9832a !important; }
.sn-acct { border-bottom-color: var(--bottle) !important; } .sn-fish { border-bottom-color: var(--lagoon) !important; } .sn-hen { border-bottom-color: var(--lime) !important; } .sn-goat { border-bottom-color: var(--clay) !important; }
.shelf-head { margin-top: 2rem; scroll-margin-top: 4rem; display: flex; align-items: center; gap: .8rem; font-size: var(--fs-xl); font-weight: 800; color: var(--tone-d); }
.shelf-head::after { content: ''; flex: 1; height: 12px; border-radius: 3px; background: linear-gradient(#b98a52, #8a5f30); box-shadow: 0 4px 0 #5e3d1c; }
.shelf-head span { font-size: var(--fs-sm); background: var(--tone); color: #fff; padding: 0 .7rem; border-radius: 4px; border: 2px solid var(--ink); }
.t-crop.shelf-head span { color: var(--ink); }
.lesson-part { scroll-margin-top: 4rem; }

/* packet card: crimped seal + label band + halftone corner */
.card { position: relative; background: var(--card); padding: calc(clamp(1rem, 3vw, 1.6rem) + 14px) clamp(1rem, 3vw, 1.6rem) clamp(1rem, 3vw, 1.6rem); border: 2.5px solid var(--ink); border-radius: 4px 4px 12px 12px; box-shadow: 6px 6px 0 rgba(23, 48, 31, .14); }
.card::before { content: ''; position: absolute; left: -2.5px; right: -2.5px; top: -2.5px; height: 14px; border-radius: 4px 4px 0 0;
  background: linear-gradient(135deg, transparent 50%, var(--card) 50%) 0 100% / 12px 6px repeat-x, repeating-linear-gradient(90deg, var(--tone) 0 6px, var(--tone-d) 6px 7px); border: 2.5px solid var(--ink); border-bottom: 0; }
.card::after { content: ''; position: absolute; right: 8px; bottom: 8px; width: 70px; height: 70px; background: radial-gradient(circle, var(--tone-s) 2.4px, transparent 2.8px) 0 0 / 9px 9px; border-radius: 0 0 8px 0; pointer-events: none; opacity: .9; }
.card > * { position: relative; z-index: 1; }
.card h3 { margin: 0 0 .5rem; font-size: var(--fs-lg); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; color: var(--tone-d); }
.widget { margin: 1.6rem 0; }
.def { margin: 1rem 0; background: var(--tone-s); border: 2px solid var(--ink); border-left: 8px solid var(--tone); border-radius: 0 8px 8px 0; padding: .8rem 1rem; }
.def b:first-child { color: var(--tone-d); }
.formula { display: inline-block; margin-top: .4rem; font-weight: 800; background: #fff; border: 2px dashed var(--tone-d); padding: .1rem .7rem; border-radius: 6px; }
.fix { margin: 1rem 0; background: #fff6e0; border: 2px dashed var(--mari-d); border-radius: 8px; padding: .7rem 1rem; }
.fix b { color: var(--mari-d); }
.fixnote { display: inline-block; font-size: var(--fs-sm); background: #fff6e0; border: 1.5px dashed var(--mari-d); padding: 0 .5rem; border-radius: 4px; }
.remember { margin: 1.4rem 0 .4rem; background: var(--lime-s); padding: .9rem 1rem; border: 2px solid var(--lime-d); border-radius: 10px; }
.remember > b:first-child { display: inline-block; background: var(--lime-d); color: #fff; padding: 0 .6rem; margin-right: .4rem; border-radius: 4px; }
.kaj { margin: 1.2rem 0; padding: .8rem 1rem; background: #fff; border: 2px solid var(--ink); border-radius: 8px; box-shadow: inset 6px 0 0 var(--tone); padding-left: 1.4rem; }
.kaj > b:first-child { color: var(--tone-d); }

/* packet back spec grid */
.packet-back { margin: 1.6rem 0; background: #fff; border: 2.5px solid var(--ink); border-radius: 10px; overflow: hidden; }
.packet-back h3 { margin: 0; padding: .35rem 1rem; background: var(--tone); color: #fff; font-size: var(--fs-lg); border-bottom: 2.5px solid var(--ink); }
.t-crop .packet-back h3 { color: var(--ink); }
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); margin: 0; }
.spec > div { padding: .6rem 1rem; border-bottom: 1.5px dashed var(--line); border-right: 1.5px dashed var(--line); }
.spec dt { font-weight: 800; color: var(--tone-d); font-size: var(--fs-sm); text-transform: none; }
.spec dd { margin: .1rem 0 0; }
.steps-plain { margin: .5rem 0; padding: .3rem 1rem .5rem 2.6rem; }
.steps-plain li { margin: .25rem 0; }

.fig { display: block; width: 100%; height: auto; }
.exp-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; margin: .6rem 0; }
@media (min-width: 760px) { .exp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }
#plant-svg, #gada-svg, #kolom-svg, #pit-svg, #gf-svg, #ra-svg { max-width: 420px; margin-inline: auto; border: 2px solid var(--ink); border-radius: 10px; background: #fbfaf2; }
#space-svg, #cal-svg, #mada-svg, #pond-svg, #sick-svg, #house-svg { max-width: 680px; margin: .6rem auto; border: 2px solid var(--ink); border-radius: 10px; background: #fbfaf2; }
#plant-svg .part, #mada-svg .sap, #sick-svg .hen { cursor: pointer; }
#plant-svg .part:focus-visible .hit, #mada-svg .sap:focus-visible .hit, #sick-svg .hen:focus-visible .hit { stroke: #1d7bff; stroke-width: 4; }
.chart-box { position: relative; height: 240px; margin: .4rem 0; }
.chart-box.donut { height: 260px; }
.chart-note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--tone-s); padding: .4rem .7rem; border-left: 4px solid var(--tone); border-radius: 0 6px 6px 0; }

.row-ctrl { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; margin: .7rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.chips button, .seg button { border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: .1rem .85rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.chips button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--tone-d); color: #fff; }
.chips button.placed { opacity: .45; text-decoration: line-through; cursor: default; }
.chips button.bad, .seg button.bad { animation: shake .4s; border-color: var(--no); background: var(--no-s); }
.chips button.good { background: var(--lime-d); color: #fff; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; }
.slider { display: flex; align-items: center; gap: .6rem; font-weight: 700; flex-wrap: wrap; margin: .4rem 0; }
.slider input { accent-color: var(--tone-d); width: 13rem; max-width: 100%; }
.slider.wide input { width: 26rem; }
.slider output { min-width: 5.5em; color: var(--tone-d); }
.btn { font: inherit; font-weight: 800; border: 2px solid var(--ink); background: var(--tone-d); color: #fff; padding: .25rem 1.1rem; border-radius: 999px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); margin: .2rem 0; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: default; }
.msg { min-height: 1.8em; font-weight: 700; margin: .5rem 0; }
.msg.ok { color: var(--ok); } .msg.no { color: var(--no); }
.readout { display: grid; gap: .3rem; background: var(--tone-s); border: 2px solid var(--ink); border-radius: 8px; padding: .6rem .8rem; }
.readout div { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; border-bottom: 1px dashed rgba(23, 48, 31, .3); padding-bottom: .2rem; }
.readout div:last-child { border-bottom: 0; }
.readout .tot { font-weight: 800; color: var(--tone-d); }
.readout .good { color: var(--ok); font-weight: 800; }
.readout .warn { color: var(--no); font-weight: 800; }
.exp-info { background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: .7rem .9rem; min-height: 5.5rem; margin: .5rem 0; }
.exp-info h4 { margin: 0 0 .3rem; font-size: var(--fs-lg); color: var(--tone-d); }
.exp-info p { margin: .3rem 0; }

/* maize fert kisti */
.kisti { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); margin-top: .6rem; }
.kisti > div { background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: .5rem .7rem; }
.kisti b { display: block; color: var(--tone-d); }
.kisti .big { font-size: var(--fs-xl); font-weight: 800; }
.kisti .bar { height: 10px; border-radius: 5px; background: var(--maize); border: 1.5px solid var(--ink); margin-top: .3rem; }

/* calendar tasks */
.tasks { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .35rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.tasks li { border: 2px solid var(--line); background: #fff; border-radius: 8px; padding: .25rem .6rem; font-size: var(--fs-sm); display: flex; gap: .4rem; align-items: center; }
.tasks li .d { font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.tasks li.now { border-color: var(--ink); background: var(--maize-s); box-shadow: 0 0 0 3px var(--maize); }
.tasks li.seen .ic { opacity: 1; }
.tasks li .ic { opacity: .25; }

/* doctor cards */
.doc-list { display: grid; gap: .7rem; }
.doc { background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: .6rem .8rem; }
.doc p { margin: 0 0 .4rem; }
.doc .ans { display: none; margin-top: .4rem; background: var(--lime-s); border-radius: 6px; padding: .4rem .6rem; font-size: var(--fs-sm); }
.doc.done .ans { display: block; }
.doc.done { border-color: var(--lime-d); }

/* tuberose blooms */
.bloom-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); margin: .6rem 0; }
.bloom { border: 2px solid var(--ink); border-radius: 10px; background: #2a3550; padding: .3rem .3rem .5rem; text-align: center; }
.bloom > svg { display: block; width: 100%; height: 110px; }
.bloom .seg { justify-content: center; }
.bloom .seg button { background: #fff; }
.bloom.ok { background: #23402d; box-shadow: 0 0 0 3px var(--lime); }
.bloom .lab { color: #fff; font-weight: 800; min-height: 1.6em; }

/* poster strip */
.poster-strip { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); counter-reset: ps; }
.poster-strip li { counter-increment: ps; background: var(--mari-s); border: 2px solid var(--ink); border-radius: 8px; padding: .4rem .6rem .5rem 2.3rem; position: relative; min-height: 3.4rem; font-size: var(--fs-sm); }
.poster-strip li::before { content: counter(ps, bengali); position: absolute; left: .45rem; top: .45rem; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--mari-d); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.poster-strip li.empty { border-style: dashed; border-color: var(--line); background: #fff; color: transparent; }
.poster-strip li.empty::before { background: var(--line); }

/* steps */
.steps { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .3rem; counter-reset: st; }
.steps li { counter-increment: st; font-size: .9rem; padding: .05rem .6rem; border: 2px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; }
.steps li::before { content: counter(st, bengali) '. '; font-weight: 800; }
.steps li.done { border-color: var(--ink); background: var(--tone-d); color: #fff; }
.q-opts { display: grid; gap: .4rem; margin-top: .4rem; grid-template-columns: 1fr; }
.q-opts button { font: inherit; font-size: var(--fs-sm); text-align: left; border: 2px solid var(--ink); background: #fff; padding: .35rem .7rem; cursor: pointer; color: var(--ink); border-radius: 8px; }
.q-opts button.bad { border-color: var(--no); background: var(--no-s); animation: shake .4s; }

/* account */
.acct-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); margin: .6rem 0; }
.acct-box { border: 2px solid var(--ink); border-radius: 8px; background: #fff; padding: .4rem .7rem .6rem; margin: 0; }
.acct-box legend { font-weight: 800; color: var(--bottle); padding: 0 .3rem; font-size: var(--fs-sm); }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); }
.acct-row label { flex: 1 1 8rem; }
.acct-row input { width: 6.5rem; font: inherit; font-size: var(--fs-sm); border: 2px solid var(--ink); border-radius: 6px; padding: .05rem .4rem; text-align: right; background: #fffef3; }
.ledger-out { margin-top: .6rem; }

/* pond, dose */
.dose-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); margin-top: .6rem; }
.dose { background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: .5rem .7rem; display: flex; gap: .6rem; align-items: center; }
.dose .ic { width: 2.2rem; height: 2.2rem; flex: none; }
.dose b { display: block; font-size: var(--fs-lg); color: var(--lagoon-d); }
.dose span { font-size: var(--fs-sm); color: var(--ink-2); }

/* match */
.match { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .match { grid-template-columns: 1fr; } }
.match-col { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; align-content: start; }
.match-col button { width: 100%; font: inherit; font-size: var(--fs-sm); text-align: left; border: 2px solid var(--ink); background: #fff; padding: .35rem .7rem; border-radius: 8px; cursor: pointer; color: var(--ink); }
.match-col button[aria-pressed="true"] { background: var(--lagoon-d); color: #fff; }
.match-col button.done { background: var(--lagoon-s); border-color: var(--lagoon); color: var(--ink); cursor: default; }
.match-col button.done::before { content: attr(data-n) ' '; font-weight: 800; color: var(--lagoon-d); }
.match-col button.bad { animation: shake .4s; border-color: var(--no); background: var(--no-s); }

/* hen systems */
.sys-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin: 1rem 0; }
.sys { background: #fff; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.sys h4 { margin: 0; padding: .25rem .9rem; background: var(--lime-d); color: #fff; font-size: var(--fs-lg); }
.sys:nth-child(2) h4 { background: #6a8d24; } .sys:nth-child(3) h4 { background: var(--bottle); }
.sys p { margin: 0; padding: .6rem .9rem; font-size: var(--fs-sm); }

/* sorter */
.sorter { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .5rem; }
.sorter li { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; justify-content: space-between; padding: .45rem .7rem; background: #fff; border: 2px solid var(--ink); border-radius: 8px; border-left: 8px solid var(--line); }
.sorter li .t { flex: 1 1 14rem; }
.sorter li.ok { background: var(--tone-s); border-left-color: var(--tone); }
.sorter li.bad { animation: shake .4s; }
.sorter .seg { margin: 0; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* bins */
.bins { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); }
.bin { border: 2px dashed var(--ink); border-radius: 10px; padding: .5rem .7rem; min-height: 5rem; background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.bin h4 { margin: 0 0 .3rem; color: var(--tone-d); display: flex; align-items: center; gap: .35rem; }
.bin ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.bin li { border: 1.5px solid var(--ink); padding: 0 .5rem; font-size: .9rem; background: var(--tone-s); border-radius: 999px; }
.bin.armed { border-style: solid; box-shadow: 0 0 0 3px var(--maize); }

/* ration table */
.ration-t { min-width: 0 !important; }
.ration-t td:last-child, .ration-t th:last-child, .ration-t td:nth-child(2) { text-align: right; white-space: nowrap; }
.ration-t .sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; border: 1.5px solid var(--ink); vertical-align: middle; margin-right: .35rem; }
.ration-t tfoot td { font-weight: 800; background: var(--tone-s); }

/* ledger */
.lg-inputs { display: grid; gap: .4rem .8rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); margin: .6rem 0; }
.ledger-t { min-width: 0 !important; font-size: var(--fs-sm); }
.ledger-t td:last-child { text-align: right; white-space: nowrap; }
.ledger-t tr.sum td { font-weight: 800; background: var(--bottle-s); }
.ledger-t tr.head td { background: var(--bottle); color: #fff; font-weight: 800; }
.ledger-t tr.profit td { background: var(--maize-s); font-weight: 800; font-size: var(--fs-base); }

/* germ list */
.germ-list { padding-left: 1.2rem; }
.germ-list li { margin: .45rem 0; }

/* player */
.player { background: var(--bottle-d); padding: clamp(.5rem, 2vw, 1rem); color: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 8px 0 -2px var(--maize), 0 14px 26px rgba(23, 48, 31, .25); margin-top: 1.2rem; }
.stage { position: relative; overflow: hidden; border-radius: 8px; border: 2px solid var(--maize); }
.stage svg:not(.ic) { width: 100%; height: auto; display: block; }
.big-play { position: absolute; inset: 0; margin: auto; width: 5.5rem; height: 5.5rem; border-radius: 50%; border: 4px solid var(--ink); background: var(--maize); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.big-play .ic { width: 2.4rem; height: 2.4rem; }
.big-play.hide { display: none; }
.caption { min-height: 3.6em; margin: .75rem .25rem; font-size: var(--fs-lg); line-height: 1.6; color: #f1f6e8; }
.controls { display: flex; align-items: center; gap: .6rem; }
.ctrl { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--maize); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.controls input { flex: 1; min-width: 0; accent-color: var(--maize); }
.time { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); white-space: nowrap; }
.chapters { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.chapters button { border: 1px solid rgba(242, 179, 27, .55); background: transparent; color: #eef5e6; border-radius: 999px; padding: .1rem .75rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chapters button.on { background: var(--maize); border-color: var(--maize); color: var(--ink); }

/* table */
.table-wrap { overflow-x: auto; margin: .6rem 0 1rem; }
.cmp { width: 100%; border-collapse: collapse; background: var(--card); min-width: 40rem; border: 2.5px solid var(--ink); }
.cmp.small-t { min-width: 0; }
.tcap { caption-side: top; text-align: left; font-weight: 800; color: var(--tone-d); padding: .3rem 0; }
.cmp th, .cmp td { border: 1.5px solid var(--line); padding: .45rem .65rem; text-align: left; vertical-align: top; }
.cmp thead th { background: var(--bottle); color: #fff; }
.cmp thead th.c-crop { background: var(--maize-d); } .cmp thead th.c-flower { background: var(--mari-d); } .cmp thead th.c-fruit { background: #8f4d0d; }
.cmp thead th.c-fish { background: var(--lagoon-d); } .cmp thead th.c-hen { background: var(--lime-d); } .cmp thead th.c-goat { background: var(--clay-d); }
.cmp td:first-child { font-weight: 800; background: var(--tone-s); }

/* quiz */
.score-pill { display: inline-block; background: var(--bottle); color: #fff; padding: .1rem .9rem; font-weight: 700; border-radius: 999px; }
.lk-q { background: var(--card); padding: 1rem; margin: .8rem 0; border: 2px solid var(--ink); border-radius: 10px; border-left: 8px solid var(--maize); }
.lk-q-stem { font-weight: 700; margin-bottom: .6rem; }
.lk-opts { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.lk-opt { display: flex; gap: .6rem; align-items: center; text-align: left; font: inherit; padding: .45rem .7rem; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.lk-opt-key { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--bottle); color: #fff; flex: none; font-size: .95rem; }
.lk-opt.is-right { border-color: var(--ok); background: #e5f2df; }
.lk-opt.is-wrong { border-color: var(--no); background: var(--no-s); }
.lk-explain { margin: .6rem 0 0; }
.lk-explain.ok { color: var(--ok); } .lk-explain.no { color: var(--no); }
.qa details, .cq-parts details { background: var(--card); padding: .6rem .9rem; margin: .5rem 0; border: 2px solid var(--line); border-left: 6px solid var(--maize); border-radius: 0 8px 8px 0; }
.qa summary, .cq-parts summary { cursor: pointer; font-weight: 700; }
.qa details p, .cq-parts details p { margin: .6rem 0 .2rem; }
.cq { margin: 1rem 0; }
.cq-stem { font-weight: 800; font-size: var(--fs-lg); }
.cq-parts { list-style: none; padding: 0; }
.summary ul { padding-left: 1.3rem; }
.summary li { margin: .4rem 0; }

.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 2rem 1rem; }
.pager-btn { display: inline-block; padding: .45rem 1.1rem; background: var(--bottle); color: #fff; text-decoration: none; font-weight: 700; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--maize-d); }
.pager-btn.disabled { background: var(--line); color: #4d5a4f; box-shadow: none; }
.credit { color: var(--ink-2); font-size: var(--fs-sm); padding-bottom: 2rem; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
[data-reveal].is-in { opacity: 1; transform: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
#hero-svg .sway { animation: sway 3.2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes sway { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }
.pop-in { animation: popin .5s both; }
@keyframes popin { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
