/* ==========================================================
   Class 6 Math · Section 1 · স্বাভাবিক সংখ্যা ও ভগ্নাংশ
   Theme: "হাটের হিসাবখাতা" — a village-market ledger. Cream ruled
   paper with a red margin line, indigo fountain-pen ink, marigold and
   leaf-green accents, rubber stamps. Band কৌতূহলী (age 11–12).
   ========================================================== */
:root {
  --paper: #f7f1e1;
  --sheet: #fffcf2;
  --rule: #d4e0ee;
  --margin: #e07a6f;
  --ink: #1f2a44;
  --ink-2: #5b6478;
  --red: #c4402f;
  --gold: #e8a317;
  --gold-soft: #fbe7b5;
  --leaf: #2f8f5b;
  --leaf-soft: #d5ecdc;
  --plum: #7a3e8e;
  --sky: #3a6fb0;
  --sky-soft: #dbe7f6;
  --ok: #2f7d4a;
  --no: #b03a2e;
}
* { box-sizing: border-box; }
body { color: var(--ink); background: var(--paper); background-image: linear-gradient(rgba(31, 42, 68, .04) 1px, transparent 1px); background-size: 100% 2.1rem; }
::selection { background: rgba(232, 163, 23, .35); }
a { color: var(--sky); }
strong { color: var(--red); }
b { color: #141c30; }
.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 > * { min-width: 0; }

/* fractions inline */
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.15; margin: 0 .12em; font-size: .9em; }
.fr i { font-style: normal; padding: 0 .2em; }
.fr i:first-child { border-bottom: 2px solid currentColor; }

/* ---------- 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: .4rem var(--gutter); background: rgba(247, 241, 225, .95); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 2px solid var(--margin); font-size: var(--fs-sm); }
.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(--red); font-weight: 700; }
.stampbar { display: flex; align-items: center; gap: .4rem; color: var(--red); font-weight: 700; }
.stampbar.pop { animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.18) rotate(-4deg); } }

/* ---------- hero ---------- */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 2rem; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.eyebrow { display: inline-block; color: var(--red); font-weight: 700; border: 2px solid var(--red); border-radius: 6px; padding: .05rem .7rem; transform: rotate(-1.5deg); font-size: var(--fs-sm); }
h1 { font-size: var(--fs-3xl); line-height: 1.25; margin: .5rem 0 1rem; color: var(--ink); }
.lede { font-size: var(--fs-lg); line-height: 1.75; }
.hint { color: var(--ink-2); border-left: 4px solid var(--gold); padding-left: .8rem; }
.ledger-card { margin: 0; background: var(--sheet); border-radius: 14px; box-shadow: 0 10px 30px rgba(31, 42, 68, .12), 0 0 0 1px #e6dcc2; overflow: hidden; }
.ledger-card > svg { display: block; width: 100%; height: auto; }

/* ---------- blocks ---------- */
.block { padding-block: clamp(1.6rem, 4vw, 3rem); }
.sec-title, .lesson-part h2, #video h2, #compare h2, #activity h2, #quiz h2 { font-size: var(--fs-2xl); line-height: 1.35; margin: .2rem 0 1rem; }
.sub-title { font-size: var(--fs-xl); margin: 2rem 0 .8rem; color: var(--plum); }
.part-tag { display: inline-block; margin: 0; font-weight: 700; color: #fff; background: var(--ink); padding: .1rem .8rem; border-radius: 4px 14px 14px 4px; font-size: var(--fs-sm); }
.goals { display: grid; gap: .6rem; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.goals li { background: var(--sheet); border: 1px solid #e6dcc2; border-left: 5px solid var(--leaf); padding: .7rem 1rem; border-radius: 8px; }

.sheet { position: relative; background: var(--sheet); border: 1px solid #e6dcc2; border-radius: 12px; padding: clamp(1rem, 3vw, 1.6rem) clamp(1rem, 3vw, 1.6rem) clamp(1rem, 3vw, 1.6rem) clamp(1.6rem, 5vw, 2.6rem); box-shadow: 0 4px 0 #ece2c8; background-image: linear-gradient(90deg, transparent calc(clamp(1rem, 3vw, 1.6rem) - 2px), var(--margin) calc(clamp(1rem, 3vw, 1.6rem) - 2px), var(--margin) clamp(1rem, 3vw, 1.6rem), transparent clamp(1rem, 3vw, 1.6rem)); }
.sheet h3 { margin: 0 0 .5rem; font-size: var(--fs-lg); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.sheet.mini { padding-top: 1rem; }
.widget { margin: 1.4rem 0; }
.story p { margin: .6rem 0; }

.def { margin: 1rem 0; background: var(--sky-soft); border: 2px dashed var(--sky); border-radius: 10px; padding: .8rem 1rem; }
.def b:first-child { color: var(--sky); }
.remember { margin: 1.4rem 0 .4rem; background: var(--gold-soft); border-radius: 10px; padding: .9rem 1rem; border-left: 6px solid var(--gold); }
.remember > b:first-child { display: inline-block; background: var(--red); color: #fff; padding: 0 .6rem; border-radius: 4px; margin-right: .4rem; transform: rotate(-2deg); }

.grid2 { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 > .widget { margin: 0; }
.tight { margin: .4rem 0; padding-left: 1.3rem; }
.tight li { margin: .25rem 0; }
.steps { padding-left: 1.4rem; }
.steps li { margin: .35rem 0; transition: opacity .4s, transform .4s; }
.steps.hidden-steps li { opacity: .15; }
.steps.hidden-steps li.on { opacity: 1; }

.rules { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); margin: 1rem 0; }
.rules.two { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.rule { background: var(--sheet); border: 1px solid #e6dcc2; border-radius: 10px; padding: .7rem .9rem; }
.rule > b:first-child { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem; margin-right: .4rem; border-radius: 50%; background: var(--ink); color: #fff; }
.rules.two .rule > b:first-child { border-radius: 8px; }

/* ---------- controls ---------- */
.row-ctrl { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: .6rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips button, .seg button { border: 2px solid var(--ink); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: .1rem .8rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chips button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--ink); color: #fff; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.inp { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.inp input { font: inherit; width: 9.5rem; max-width: 100%; padding: .2rem .6rem; border: 2px solid var(--ink); border-radius: 8px; background: #fff; color: var(--ink); }
#nr-input { width: 12rem; }
#cp-widget .inp input, #vn-widget .inp input { width: 6rem; }
.slider { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; flex-wrap: wrap; }
.slider input { accent-color: var(--red); width: 9rem; }
.slider .pair { display: inline-flex; flex-direction: column; }
.slider .pair input { width: 7rem; }
.btn { font: inherit; font-weight: 700; border: 0; background: var(--red); color: #fff; padding: .35rem 1.1rem; border-radius: 8px; cursor: pointer; box-shadow: 0 3px 0 #8e2b1f; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #8e2b1f; }
.btn.ghost { background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: default; }
.msg { min-height: 1.8em; font-weight: 700; margin: .5rem 0; }
.msg.ok { color: var(--ok); } .msg.no { color: var(--no); }
.pill { display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: .05rem .8rem; font-size: var(--fs-sm); }
.tag { display: inline-block; border-radius: 5px; padding: 0 .5rem; font-size: var(--fs-sm); color: #fff; font-weight: 700; }
.tag.desi { background: var(--red); } .tag.intl { background: var(--sky); }
.num-big { font-size: var(--fs-xl); letter-spacing: .03em; }

/* place value */
.pv-board { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1rem 0 .5rem; }
.pv-col { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.pv-col .pv-name { font-size: var(--fs-sm); color: var(--ink-2); }
.pv-digit { width: 3.4rem; height: 4rem; font: inherit; font-size: 2rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; transition: transform .25s, background .25s; }
.pv-digit[aria-pressed="true"] { background: var(--gold); transform: translateY(-6px); }
.pv-val { font-weight: 700; color: var(--red); min-height: 1.6em; font-size: var(--fs-sm); }
.expand { text-align: center; font-size: var(--fs-lg); font-weight: 700; color: var(--plum); }

/* number reader */
.nr-scroll { overflow-x: auto; padding-bottom: .3rem; }
.nr-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(3.1rem, 1fr); gap: 2px; min-width: max-content; margin: .8rem 0; font-size: .85rem; text-align: center; }
.nr-cell { display: grid; grid-template-rows: auto auto auto; gap: 2px; }
.nr-cell span { padding: .15rem .1rem; border-radius: 4px; line-height: 1.35; }
.nr-cell .d { font-size: 1.6rem; font-weight: 800; background: #fff; border: 2px solid var(--ink); }
.nr-cell .n1 { background: #fbe1dd; color: var(--red); font-weight: 700; }
.nr-cell .n2 { background: var(--sky-soft); color: var(--sky); font-weight: 700; }
.nr-cell.gd .n1 { border-right: 4px solid var(--red); }
.nr-cell.gi .n2 { border-right: 4px solid var(--sky); }
.nr-cell.off .d { opacity: .25; }
.nr-out p { margin: .6rem 0; }

.rel-svg, .bk-svg, .fb-svg, .cm-svg, .ag-svg, .dvf-svg, .vn-svg, .bl-svg, .cq-fig { display: block; width: 100%; height: auto; }
.ag-svg { max-width: 460px; margin: 0 auto; }
.dvf-svg { max-width: 380px; margin: 0 auto .6rem; }

/* digit puzzle */
.dg-slots, .dg-cards { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: .8rem 0; }
.dg-slot, .dg-card { width: 3rem; height: 3.8rem; font: inherit; font-size: 1.8rem; font-weight: 800; border-radius: 8px; cursor: pointer; }
.dg-slot { border: 2px dashed var(--ink-2); background: #fff; color: var(--ink); }
.dg-slot.comma { width: 1rem; border: 0; background: none; cursor: default; color: var(--red); }
.dg-card { border: 2px solid var(--ink); background: var(--gold-soft); color: var(--ink); box-shadow: 0 3px 0 var(--gold); transition: transform .2s, opacity .2s; }
.dg-card[disabled] { opacity: .2; transform: scale(.85); }

/* factor arrays */
.fa-arrays { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin: 1rem 0; }
.fa-arr { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: var(--fs-sm); font-weight: 700; }
.fa-arr > svg { display: block; max-width: 100%; height: auto; }

/* sieve */
#sv-btns button { min-width: 4.5rem; }
.sv-grid { max-width: 760px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: .8rem 0; }
.sv-cell { aspect-ratio: 1.25; display: grid; place-items: center; border-radius: 5px; background: #fff; border: 1px solid #e3d8bd; font-weight: 700; font-size: clamp(.7rem, 2.4vw, 1.05rem); transition: background .3s, color .3s, opacity .3s, transform .3s; }
.sv-cell.x { opacity: .3; text-decoration: line-through; }
.sv-cell.p { background: var(--leaf); color: #fff; border-color: var(--leaf); transform: scale(1.04); }
.sv-cell.one { background: #eee; color: #999; }
.chart-box { position: relative; height: 240px; margin-top: 1rem; }

.cp-out, .vn-out, .fg-out, .cm-out { margin-top: .6rem; }
.cp-row { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: .3rem 0; }
.cp-row .lab { font-weight: 700; min-width: 5rem; }
.fchip { display: inline-block; min-width: 2rem; text-align: center; padding: 0 .4rem; border-radius: 6px; background: #fff; border: 1.5px solid #cfc3a5; }
.fchip.common { background: var(--gold); border-color: var(--gold); font-weight: 800; }

/* divisibility */
.dv-digits { display: flex; justify-content: center; gap: .3rem; margin: .8rem 0; flex-wrap: wrap; }
.dv-digits span { width: 2.6rem; height: 3.2rem; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 8px; background: #fff; transition: background .3s; }
.dv-digits span.hl { background: var(--gold); }
.dv-out { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.dv-card { border-radius: 10px; padding: .55rem .8rem; border: 2px solid; background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.dv-card.yes { border-color: var(--ok); background: #e8f5ec; }
.dv-card.no { border-color: #d9b9b4; background: #fbf0ee; }
.dv-card b { font-size: var(--fs-lg); }
.md-num { text-align: center; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: .1em; margin: .6rem 0; }
.md-num .hole { color: var(--red); border-bottom: 4px solid var(--red); padding: 0 .1em; }
.md-strip { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: .6rem; }
.md-strip span { text-align: center; border-radius: 6px; padding: .2rem 0; font-weight: 700; background: #f1e9d6; color: var(--ink-2); }
.md-strip span.good { background: var(--leaf); color: #fff; }
.md-strip span.cur { outline: 3px solid var(--red); }

/* gcd ladders */
.ld-steps, .eu-ladder { font-size: 1.15rem; margin: .8rem 0; min-height: 9rem; overflow-x: auto; }
.ld-row { display: flex; gap: .5rem; align-items: baseline; margin: .25rem 0; animation: rise .4s both; flex-wrap: wrap; }
.ld-row .eq { font-weight: 700; }
.ld-row .rem { color: var(--red); font-weight: 800; }
.ld-final { margin-top: .5rem; font-weight: 800; color: var(--leaf); }
.eu-table { border-collapse: collapse; }
.eu-table td { padding: .15rem .6rem; }
.eu-table td.dv { color: var(--red); font-weight: 800; border-right: 3px solid var(--ink); text-align: right; }
.eu-table tr:not(:last-child) td.nums { border-bottom: 3px solid var(--ink); }
.eu-table tr { animation: rise .4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.vn-out p { margin: .3rem 0; }

/* fraction calculator */
.fc-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: center; margin: .8rem 0; }
.fc-in { display: inline-flex; align-items: center; gap: .3rem; }
.fc-in input { font: inherit; width: 3.4rem; text-align: center; padding: .1rem; border: 2px solid var(--ink); border-radius: 6px; }
.fc-in .stack { display: inline-flex; flex-direction: column; gap: 3px; }
.fc-in .stack input:first-child { border-bottom-width: 4px; }
.fc-steps { padding-left: 1.4rem; font-size: 1.1rem; }
.fc-steps li { margin: .5rem 0; animation: rise .4s both; }
.fc-steps li.final { font-weight: 800; color: var(--leaf); }

.fg-row { margin: .5rem 0; padding: .6rem .8rem; background: #fff; border-radius: 8px; border: 1px solid #e6dcc2; }

/* BODMAS */
.bodmas { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 1rem 0; }
.bodmas span { display: grid; place-items: center; min-width: 4.2rem; padding: .3rem .6rem; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; text-align: center; line-height: 1.4; font-size: var(--fs-sm); }
.bodmas span b { color: var(--gold); font-size: 1.4rem; display: block; font-family: system-ui, sans-serif; }
.bd-expr { font-size: clamp(1.1rem, 3.2vw, 1.5rem); line-height: 2.4; text-align: center; padding: .8rem; background: #fff; border-radius: 10px; border: 1px solid #e6dcc2; overflow-x: auto; margin: .8rem 0; }
.bd-expr .hl { background: var(--gold-soft); outline: 2px solid var(--gold); border-radius: 6px; padding: 0 .15em; }
.bd-expr .new { color: var(--leaf); font-weight: 800; }

/* decimals */
.dc-board { font-family: "Noto Serif Bengali", serif; font-size: clamp(1.3rem, 4vw, 1.9rem); margin: 1rem auto; display: grid; justify-content: center; gap: .1rem; overflow-x: auto; }
.dc-line { display: flex; justify-content: flex-end; }
.dc-line span { width: 1.25em; text-align: center; }
.dc-line span.dot { color: var(--red); font-weight: 900; width: .6em; }
.dc-line span.pad { color: var(--gold); }
.dc-line.res { border-top: 3px solid var(--ink); font-weight: 800; color: var(--leaf); }
.dc-line .op { width: 1.4em; color: var(--ink-2); }
.dc-notes { color: var(--ink-2); }
#dc-inputs .inp input { width: 8rem; }
.dcol { position: absolute; top: 0; bottom: 0; width: .6em; background: rgba(196, 64, 47, .1); }

/* receipt */
.ledger { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: 1.05rem; }
.ledger th, .ledger td { border-bottom: 1px solid var(--rule); padding: .35rem .4rem; text-align: left; }
.ledger th { background: var(--ink); color: #fff; }
.ledger td.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger tr.sum td { font-weight: 800; border-top: 2px solid var(--ink); }
.ledger tr.big td { color: var(--leaf); font-size: 1.2rem; }
.ledger.writing tbody tr { opacity: 0; }
.ledger.writing tbody tr.on { opacity: 1; transition: opacity .4s; }

/* ---------- player ---------- */
.player { border-radius: 16px; background: var(--ink); padding: clamp(.5rem, 2vw, 1rem); color: #fff; }
.stage { position: relative; border-radius: 10px; 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(--red); 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(--gold); }
.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, .45); background: transparent; color: #f2ecdc; border-radius: 8px; padding: .1rem .7rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chapters button.on { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* compare table */
.table-wrap { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; background: var(--sheet); min-width: 34rem; }
.cmp th, .cmp td { border: 1px solid #e0d4b6; padding: .55rem .7rem; text-align: left; vertical-align: top; }
.cmp thead th { background: var(--ink); color: #fff; }
.cmp thead th:nth-child(2) { background: var(--leaf); }
.cmp thead th:nth-child(3) { background: var(--plum); }
.cmp tbody th { background: var(--gold-soft); white-space: nowrap; }

/* race */
.race-top { display: flex; gap: .5rem; flex-wrap: wrap; }
.race-ask { font-size: var(--fs-xl); font-weight: 800; text-align: center; margin: 1rem 0; }
.race-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(7rem, 100%), 1fr)); gap: .5rem; margin-bottom: 1rem; }
.race-opts button { font: inherit; font-size: var(--fs-lg); font-weight: 800; padding: .4rem; border-radius: 10px; border: 2px solid var(--ink); background: #fff; cursor: pointer; color: var(--ink); }
.race-opts button.right { background: var(--leaf); color: #fff; border-color: var(--leaf); }
.race-opts button.wrong { background: #f3d6d1; }

/* quiz */
.score-pill { display: inline-block; background: var(--leaf); color: #fff; padding: .1rem .9rem; border-radius: 999px; font-weight: 700; }
.lk-q { background: var(--sheet); border: 1px solid #e6dcc2; border-radius: 12px; padding: 1rem; margin: .8rem 0; }
.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 #d9cdb0; border-radius: 10px; 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(--ink); color: #fff; flex: none; font-size: .95rem; }
.lk-opt.is-right { border-color: var(--ok); background: #e5f4ea; }
.lk-opt.is-wrong { border-color: var(--no); background: #fbe9e6; }
.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(--sheet); border: 1px solid #e6dcc2; border-radius: 10px; padding: .6rem .9rem; margin: .5rem 0; }
.qa summary, .cq-parts summary { cursor: pointer; font-weight: 700; }
.qa details p, .cq-parts details p { margin: .6rem 0 .2rem; color: #26324f; }
.cq { margin: 1rem 0; }
.cq-stem { font-weight: 700; }
.cq-parts { list-style: none; padding: 0; }
.cq-fig { max-width: 520px; margin: .6rem auto; }

.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: 10px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; }
.pager-btn.disabled { background: #d8cfb9; color: #5b5444; }
.credit { color: var(--ink-2); font-size: var(--fs-sm); padding-bottom: 2rem; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
[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; }
}
