/* ==========================================================
   Class 6 Agriculture · Section 1 · আমাদের জীবনে কৃষি
   Theme: "আল-বাঁধা খেতের নকশা" — a bird's-eye patchwork map
   of a Bangladeshi farming village. Sun-dried clay page with a
   faint আল (earth-ridge) grid; cards are field plots with a
   mud-brown ridge border and a crop-row stripe on top. Four
   domain colours: ফসল paddy green, মৎস্য pond blue,
   পশু-পাখি straw ochre, বন forest; mustard-flower accent.
   Band কৌতূহলী (11–12).
   ========================================================== */
:root {
  --bg: #f4eedd;
  --card: #fffbef;
  --ink: #2e2417;
  --ink-2: #6a5c48;
  --ridge: #8b6a3e;
  --ridge-d: #5f4423;
  --ridge-s: #e9dcc0;
  --crop: #4b8b2b;
  --crop-d: #2f6118;
  --crop-s: #e3f0d3;
  --fish: #2378a3;
  --fish-d: #155777;
  --fish-s: #dceef6;
  --ani: #c47f1c;
  --ani-d: #8a5508;
  --ani-s: #fbecd2;
  --for: #2f5d3b;
  --for-s: #dde9de;
  --mustard: #f0c419;
  --mustard-s: #fdf3c8;
  --brick: #b5482c;
  --brick-s: #f8e1d8;
  --line: #e0d3b6;
  --ok: #2f6118;
  --no: #a8321d;
}
* { box-sizing: border-box; }
body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(139, 106, 62, .07) 2px, transparent 2px) 0 0 / 140px 110px,
    linear-gradient(rgba(139, 106, 62, .07) 2px, transparent 2px) 0 0 / 140px 110px,
    radial-gradient(ellipse at 0% 0%, rgba(240, 196, 25, .16), transparent 45%),
    var(--bg);
}
::selection { background: rgba(240, 196, 25, .45); }
a { color: var(--fish-d); }
strong { color: var(--crop-d); }
.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 > *, .grid2 > *, .row-ctrl > *, .exp-grid > *, .match-cols > *, .area-cols > * { min-width: 0; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; padding: .5rem var(--gutter) .75rem; background: rgba(244, 238, 221, .95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: var(--fs-sm); border-bottom: 3px double var(--ridge); }
.crumbs { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--crop-d); font-weight: 700; }
.level { display: flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--ani-d); }
.sheaf-badge { width: 2.1rem; height: 2.1rem; }
.level.pop .sheaf-badge { animation: sway .7s; }
@keyframes sway { 30% { transform: rotate(-10deg) scale(1.15); } 65% { transform: rotate(7deg); } }
.paddy-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; overflow: hidden; pointer-events: none; }
.paddy-strip span { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; transform-origin: bottom; transform: scaleY(var(--grow, .25));
  background: repeating-linear-gradient(90deg, transparent 0 5px, var(--crop) 5px 7px, transparent 7px 12px, #6aa83c 12px 14px, transparent 14px 18px);
  -webkit-mask: linear-gradient(90deg, #000 var(--done, 0%), rgba(0, 0, 0, .35) var(--done, 0%)); mask: linear-gradient(90deg, #000 var(--done, 0%), rgba(0, 0, 0, .35) var(--done, 0%)); }

/* hero */
.hero { position: relative; padding: clamp(1.4rem, 4vw, 2.8rem) 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.05fr; } }
.eyebrow { display: inline-block; color: var(--crop-d); background: var(--crop-s); font-weight: 800; padding: .1rem .9rem; border-radius: 6px; font-size: var(--fs-sm); border: 2px solid var(--crop); }
h1 { font-size: var(--fs-3xl); line-height: 1.3; margin: .7rem 0 1rem; color: var(--crop-d); }
.lede { font-size: var(--fs-lg); line-height: 1.75; }
.hint { color: var(--ink-2); border-left: 5px solid var(--mustard); padding-left: .8rem; }
.map-frame { margin: 0; border-radius: 10px; overflow: hidden; background: #cbb68a; border: 6px solid var(--ridge); outline: 2px solid var(--ridge-s); outline-offset: -10px; box-shadow: 0 18px 40px rgba(46, 36, 23, .18); }
.map-frame > svg { display: block; width: 100%; height: auto; }
#hero-svg .plot { cursor: pointer; }
#hero-svg .plot:focus-visible .edge { stroke: #1d7bff; stroke-width: 5; }
.hero-read { margin: 0; padding: .5rem 1rem; background: var(--ridge-d); color: #fff6e0; font-weight: 700; min-height: 2.9em; }

/* blocks */
.block { padding-block: clamp(1.6rem, 4vw, 3rem); }
.sec-title, .lesson-part h2, #video h2, #compare h2, #activity h2, #quiz h2, .story h2 { font-size: var(--fs-2xl); line-height: 1.4; margin: .3rem 0 1rem; color: var(--crop-d); }
.story h2 { font-size: var(--fs-xl); }
.sub-title { font-size: var(--fs-xl); margin: 2rem 0 .8rem; color: var(--ridge-d); }
.part-tag { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 800; color: var(--ridge-d); font-size: var(--fs-sm); }
.part-tag::before { content: ''; width: 18px; height: 14px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--crop) 0 3px, var(--mustard) 3px 6px); border: 2px solid var(--ridge); }
.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); border-radius: 6px; padding: .7rem 1rem .7rem 2.7rem; border: 2px solid var(--ridge-s); position: relative; }
.goals li::before { content: ''; position: absolute; left: .9rem; top: 1rem; width: 1.1rem; height: 1.1rem; border-radius: 50% 0; background: var(--crop); transform: rotate(-20deg); }

/* card = field plot */
.card { position: relative; background: var(--card); border-radius: 8px; padding: clamp(1rem, 3vw, 1.6rem); border: 3px double var(--ridge); box-shadow: 0 6px 0 var(--ridge-s), 0 12px 26px rgba(46, 36, 23, .08); }
.plot-card { padding-top: calc(clamp(1rem, 3vw, 1.6rem) + 10px); }
.plot-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 5px 5px 0 0; background: repeating-linear-gradient(90deg, var(--crop) 0 10px, #79b04a 10px 14px, var(--crop) 14px 24px, var(--mustard) 24px 28px); opacity: .9; }
.pond-card::before { background: repeating-linear-gradient(90deg, var(--fish) 0 14px, #5fb0d6 14px 20px); }
.yard-card::before { background: repeating-linear-gradient(90deg, var(--ani) 0 12px, #e8b45c 12px 18px); }
.card > * { position: relative; }
.card h3 { margin: 0 0 .5rem; font-size: var(--fs-lg); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; color: var(--crop-d); }
.widget { margin: 1.6rem 0; }
.def { margin: 1rem 0; background: var(--crop-s); border-left: 6px solid var(--crop); border-radius: 4px; padding: .8rem 1rem; }
.def b:first-child { color: var(--crop-d); }
.def-inline { background: var(--crop-s); border-radius: 4px; padding: .4rem .6rem; }
.remember { margin: 1.4rem 0 .4rem; background: var(--mustard-s); border-radius: 6px; padding: .9rem 1rem; border: 2px dashed #c9a10e; }
.remember > b:first-child, .new-words > b:first-child { display: inline-block; background: var(--mustard); color: var(--ink); padding: 0 .6rem; border-radius: 4px; margin-right: .4rem; }
.new-words { background: var(--card); border: 2px solid var(--ridge-s); border-radius: 6px; padding: .6rem 1rem; }

.grid2 { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.mini-plot { border-radius: 6px; padding: .8rem 1rem; border: 3px solid; background: var(--card); }
.mini-plot h4 { margin: 0 0 .4rem; font-size: var(--fs-lg); }
.mini-plot p { margin: .4rem 0; }
.mini-plot.field { border-color: var(--crop); background: linear-gradient(var(--crop-s), var(--card) 3rem); }
.mini-plot.field h4 { color: var(--crop-d); }
.mini-plot.garden { border-color: #b8860b; background: linear-gradient(var(--mustard-s), var(--card) 3rem); }
.mini-plot.garden h4 { color: #8a6408; }
.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; } }
#tree-svg, #thali-svg, #pond-svg, #animal-svg, #forest-svg, #ladder-svg { max-width: 440px; margin-inline: auto; }
#crop-svg, #flow-svg { max-width: 720px; margin-inline: auto; }
.hot { cursor: pointer; }
.hot:focus-visible rect, .hot:focus-visible circle, .hot:focus-visible path.edge { stroke: #1d7bff; stroke-width: 4; }

.row-ctrl { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: .7rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.chips button, .seg button { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: .1rem .8rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.chips button .ic { width: 1.3rem; height: 1.3rem; }
.chips button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--crop); color: #fff; border-color: var(--crop-d); }
.chips button.placed { opacity: .5; }
.chips button.done { background: var(--crop-s); border-color: var(--crop); color: var(--crop-d); }
.chips button.sel { outline: 3px solid var(--mustard); outline-offset: 1px; border-color: #b8860b; }
.chips button.bad, .seg button.bad { animation: shake .4s; border-color: var(--no); }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.seg:empty { display: none; }
.slider { display: flex; align-items: center; gap: .6rem; font-weight: 700; flex-wrap: wrap; margin: .6rem 0; }
.slider input { accent-color: var(--for); width: 14rem; max-width: 100%; }
.btn { font: inherit; font-weight: 800; border: 0; background: var(--crop); color: #fff; padding: .3rem 1.1rem; border-radius: 6px; cursor: pointer; box-shadow: 0 3px 0 var(--crop-d); margin: .2rem 0; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--crop-d); }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.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); }
.exp-info { background: #fff; border: 2px solid var(--line); border-radius: 6px; padding: .7rem .9rem; min-height: 6rem; margin: .5rem 0; }
.exp-info h4 { margin: 0 0 .3rem; font-size: var(--fs-lg); color: var(--ridge-d); }
.exp-info p { margin: .3rem 0; }
.exp-info ul { margin: .3rem 0; padding-left: 1.2rem; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* needs bins */
.bins { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); margin: .6rem 0; }
.bin { font: inherit; text-align: left; border: 2px dashed var(--ridge); border-radius: 6px; background: var(--ridge-s); padding: .4rem .6rem; min-height: 5.6rem; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; gap: .25rem; }
.bin b { display: flex; align-items: center; gap: .35rem; color: var(--ridge-d); }
.bin b .ic { width: 1.5rem; height: 1.5rem; }
.bin span { font-size: var(--fs-sm); color: var(--crop-d); }
.bin.ready { border-style: solid; border-color: #b8860b; background: var(--mustard-s); }
.bin.bad { animation: shake .4s; border-color: var(--no); }

/* crops */
.crop-now { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-xl); font-weight: 800; color: var(--crop-d); margin: .4rem 0; min-height: 2.6rem; }
.crop-now .ic { width: 2.4rem; height: 2.4rem; }
.crop-now small { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
#crop-l2 button { border-style: dashed; }

/* fish */
.catch { list-style: none; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.catch li { background: var(--fish-s); color: var(--fish-d); border: 2px solid var(--fish); border-radius: 6px; padding: 0 .6rem; font-weight: 700; font-size: var(--fs-sm); }
.fish-stats { margin-top: .8rem; align-items: center; }
.protein { text-align: center; }
.protein > svg { width: 100%; max-width: 200px; height: auto; display: block; margin: 0 auto; }
.chart-box { position: relative; height: 240px; margin: .4rem 0; }
.chart-note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--mustard-s); border-radius: 4px; padding: .4rem .7rem; }

/* animals */
.gifts { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.gifts li { display: flex; align-items: center; gap: .5rem; border: 2px solid var(--line); border-radius: 6px; padding: .3rem .6rem; background: #fff; color: #9a8f7c; transition: all .3s; }
.gifts li .ic { width: 1.6rem; height: 1.6rem; filter: grayscale(1); opacity: .5; transition: all .3s; }
.gifts li.on { color: var(--ink); border-color: var(--ani); background: var(--ani-s); font-weight: 700; }
.gifts li.on .ic { filter: none; opacity: 1; }

/* forest */
.meter { position: relative; height: 16px; border-radius: 4px; background: var(--ridge-s); border: 2px solid var(--ridge); margin: .3rem 0 .8rem; overflow: hidden; }
.meter span { position: absolute; inset: 0 auto 0 0; background: var(--for); width: 13%; transition: width .3s; }
.meter .mark { position: absolute; top: -2px; bottom: -2px; left: calc(25 / 60 * 100%); width: 3px; background: var(--mustard); }
#gas-svg { width: 100%; height: auto; display: block; max-width: 320px; }

/* area list */
.area-cols { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin: .6rem 0; }
.area-col { border: 2px solid var(--line); border-radius: 6px; padding: .5rem .7rem; background: #fff; }
.area-col h4 { margin: 0 0 .2rem; font-size: var(--fs-base); display: flex; align-items: center; gap: .35rem; }
.area-col h4 .ic { width: 1.4rem; height: 1.4rem; }
.area-col .add { display: flex; gap: .3rem; margin-top: .3rem; }
.area-col .add input { flex: 1; min-width: 0; font: inherit; font-size: var(--fs-sm); border: 2px solid var(--line); border-radius: 6px; padding: .1rem .5rem; }
.area-col .add button { font: inherit; font-size: var(--fs-sm); border: 0; background: var(--ridge); color: #fff; border-radius: 6px; padding: 0 .7rem; cursor: pointer; }
.rep-out { margin-top: .8rem; background: #fff; border: 2px solid var(--crop); border-radius: 6px; padding: .8rem 1rem; }
.rep-out h4 { margin: 0 0 .4rem; color: var(--crop-d); }
.rep-out ul, .rep-out ol { margin: .2rem 0 .6rem; padding-left: 1.3rem; }

/* info stalls */
.stalls { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); margin: .6rem 0; }
.stall { font: inherit; border: 2px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; padding: 0 0 .5rem; color: var(--ink); overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.stall::before { content: ''; align-self: stretch; height: 14px; background: repeating-linear-gradient(90deg, var(--brick) 0 14px, #fff 14px 28px); border-bottom: 2px solid var(--ridge); }
.stall .ic { width: 2.4rem; height: 2.4rem; }
.stall b { font-size: var(--fs-sm); }
.stall.seen { border-color: var(--crop); background: var(--crop-s); }
.stall[aria-pressed="true"] { outline: 3px solid var(--mustard); }

/* sorter rows */
.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: .5rem .7rem; border-radius: 6px; background: #fff; border: 2px solid var(--line); }
.sorter li .t { flex: 1 1 15rem; }
.sorter li.ok { background: var(--crop-s); border-color: var(--crop); }
.sorter li.bad { animation: shake .4s; border-color: var(--no); }
.sorter .seg { margin: 0; }
.sorter .seg button { font-size: .95rem; }

/* match cols */
.match-cols { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.chips.col { flex-direction: column; align-items: stretch; }
.chips.col button { justify-content: flex-start; text-align: left; }

/* packets */
.packets { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); margin: .6rem 0; }
.packet { font: inherit; border: 0; padding: 0; background: none; cursor: pointer; perspective: 800px; min-height: 9.5rem; color: var(--ink); text-align: left; }
.packet .in { position: relative; display: block; width: 100%; height: 100%; min-height: 9.5rem; transition: transform .6s; transform-style: preserve-3d; }
.packet.flip .in { transform: rotateY(180deg); }
.packet .f, .packet .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; padding: .6rem .7rem; border: 2px solid var(--ridge); display: flex; flex-direction: column; gap: .3rem; }
.packet .f { background: linear-gradient(var(--mustard) 0 30%, var(--card) 30%); align-items: center; justify-content: center; text-align: center; font-weight: 800; color: var(--ridge-d); }
.packet .f .ic { width: 2.2rem; height: 2.2rem; }
.packet .b { background: var(--crop-s); transform: rotateY(180deg); font-size: var(--fs-sm); line-height: 1.6; overflow: auto; }
.packet .b b { color: var(--crop-d); }

/* X Y figure */
.xy-fig { margin: .4rem 0 0; max-width: 440px; }
.xy-fig > svg { width: 100%; height: auto; display: block; }
.story .part-tag { margin-bottom: .4rem; }

/* player */
.player { border-radius: 10px; background: #3b2d1b; padding: clamp(.5rem, 2vw, 1rem); color: #fff; box-shadow: 0 16px 36px rgba(46, 36, 23, .3); border: 4px solid var(--ridge); }
.stage { position: relative; border-radius: 6px; overflow: hidden; }
.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 #fff; background: var(--crop); color: #fff; display: grid; place-items: center; cursor: pointer; }
.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; }
.controls { display: flex; align-items: center; gap: .6rem; }
.ctrl { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.controls input { flex: 1; min-width: 0; accent-color: var(--mustard); }
.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(255, 255, 255, .5); background: transparent; color: #f6ecd6; border-radius: 6px; padding: .1rem .7rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chapters button.on { background: var(--mustard); border-color: var(--mustard); 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: 3px double var(--ridge); }
.cmp th, .cmp td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.cmp thead th { background: var(--ridge-d); color: #fff; }
.cmp thead th.c-crop { background: var(--crop); }
.cmp thead th.c-fish { background: var(--fish); }
.cmp thead th.c-ani { background: var(--ani-d); }
.cmp thead th.c-for { background: var(--for); }
.cmp td:first-child { font-weight: 800; background: var(--ridge-s); }

/* quiz */
.score-pill { display: inline-block; background: var(--ridge-d); color: #fff; padding: .1rem .9rem; border-radius: 6px; font-weight: 700; }
.lk-q { background: var(--card); border-radius: 6px; padding: 1rem; margin: .8rem 0; border: 2px solid var(--line); border-left: 7px solid var(--crop); }
.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: 6px; background: #fff; color: var(--ink); cursor: pointer; }
.lk-opt-key { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 4px; background: var(--ridge); color: #fff; flex: none; font-size: .95rem; }
.lk-opt.is-right { border-color: var(--ok); background: var(--crop-s); }
.lk-opt.is-wrong { border-color: var(--no); background: var(--brick-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); border-radius: 6px; padding: .6rem .9rem; margin: .5rem 0; border: 2px solid var(--line); border-left: 6px solid var(--ani); }
.cq .cq-parts details { background: #fff; }
.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: .5rem 1.1rem; border-radius: 6px; background: var(--crop-d); color: #fff; text-decoration: none; font-weight: 700; border: 2px solid var(--crop-d); }
.pager-btn.disabled { background: var(--line); color: #5b4e3a; border-color: var(--line); }
.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); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* small motions */
.muted-l { opacity: .75; font-weight: 400; }
#hero-svg .ripple ellipse { animation: ripple 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#hero-svg .ripple ellipse:nth-child(2) { animation-delay: -1.5s; }
@keyframes ripple { 50% { transform: scale(1.5); opacity: .3; } }
#pond-svg .swim { animation: swim 4s ease-in-out infinite; }
@keyframes swim { 50% { transform: translateX(14px); } }
#gas-svg .flow-o, #gas-svg .flow-c { animation: dash 1.4s linear infinite; }
#gas-svg .flow-c { animation-direction: reverse; }
@keyframes dash { to { stroke-dashoffset: -28; } }
#crop-svg .sprout { animation: sprout .6s ease-out; transform-box: fill-box; transform-origin: bottom; }
@keyframes sprout { from { transform: scale(.2); } }

/* wide diagrams scroll inside their box on phones */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-x > svg { min-width: 600px; }
