/* ==========================================================
   Class 7 ICT · Section 4 · ওয়ার্ড প্রসেসিং
   Theme: "অক্ষর-চাবির ল্যাব" — a keyboard workshop. Cool light-grey
   page, graphite keyboard plates for the hero, simulators and player,
   cards shaped like big ivory keycaps (face + darker skirt), part tags
   as keycaps with a Bangla letter legend. Accents: Bijoy magenta (the
   book's pink layout), phonetic green, editing blue, format violet,
   print/doc amber. Badge: a keycap that presses down.
   Band কৌতূহলী (12–13).
   ========================================================== */
:root {
  --bg: #eceef3;
  --bg-2: #dfe3ea;
  --cap: #fbfaf6;
  --cap-edge: #d6d3ca;
  --cap-skirt: #b9b5aa;
  --plate: #262a33;
  --plate-2: #323744;
  --plate-line: #454b5a;
  --ink: #1f2430;
  --ink-2: #5a6172;
  --magenta: #c2185b;
  --magenta-d: #8c0f40;
  --green: #2e8b57;
  --green-d: #1d6a40;
  --blue: #1f6fc5;
  --blue-d: #154f8e;
  --violet: #6b4fb8;
  --amber: #e39b00;
  --amber-d: #a86f00;
  --ok: #1f8a4a;
  --no: #c23a4f;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { color: var(--ink); background-color: var(--bg); background-image: radial-gradient(circle at 1px 1px, rgba(38, 42, 51, .07) 1px, transparent 1.5px); background-size: 22px 22px; }
::selection { background: rgba(194, 24, 91, .22); }
a { color: var(--blue-d); }
strong { color: var(--magenta-d); }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #111; 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 > *, .fm-grid > *, .pr-grid > *, .row-ctrl > *, .ph-io > * { min-width: 0; }
.lat, .k, .key, .clip, .combo, .doc, .fm-tools small { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Noto Serif Bengali', monospace; }
.lat { background: #e5e8ef; padding: 0 .35rem; border-radius: 4px; }
.k { display: inline-block; min-width: 1.7em; text-align: center; padding: 0 .35rem; margin: 0 .05rem; border-radius: 6px; background: var(--cap); border: 1px solid var(--cap-edge); box-shadow: 0 3px 0 var(--cap-skirt); font-size: .85em; font-weight: 700; line-height: 1.5; color: var(--ink); }

/* 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(38, 42, 51, .95); color: #e6e8ee; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 3px solid var(--magenta); font-size: var(--fs-sm); }
.crumbs { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.crumbs a { color: #b9bfcc; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #ffb3cf; font-weight: 700; }
.level { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: #fff; }
.kc-badge { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 7px; background: var(--cap); color: var(--magenta); border: 1px solid var(--cap-edge); box-shadow: 0 4px 0 var(--cap-skirt); font-weight: 900; transition: transform .1s, box-shadow .1s; }
.level.pop .kc-badge { animation: press .5s; }
@keyframes press { 30% { transform: translateY(4px); box-shadow: 0 0 0 var(--cap-skirt); background: #ffd9e7; } }

/* 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: #fff; background: var(--plate); font-weight: 700; padding: .1rem .9rem; border-radius: 8px; font-size: var(--fs-sm); box-shadow: 0 4px 0 #11141a; }
h1 { font-size: var(--fs-3xl); line-height: 1.25; margin: .6rem 0 1rem; color: var(--plate); }
h1::after { content: ""; display: block; width: 4.5rem; height: 6px; border-radius: 3px; margin-top: .4rem; background: linear-gradient(90deg, var(--magenta), var(--green), var(--blue), var(--amber)); }
.lede { font-size: var(--fs-lg); line-height: 1.75; }
.hint { color: var(--ink-2); border-left: 4px solid var(--magenta); padding-left: .8rem; }
.hero-fig { margin: 0; border-radius: 20px; overflow: hidden; background: var(--plate); box-shadow: 0 10px 0 #11141a, 0 24px 40px rgba(20, 24, 32, .3); }
.hero-fig > svg { display: block; width: 100%; height: auto; }

/* blocks */
.block { padding-block: clamp(1.6rem, 4vw, 3rem); }
.sec-title, .lesson-part h2, #compare h2, #activity h2, #quiz h2 { font-size: var(--fs-2xl); line-height: 1.35; margin: .5rem 0 1rem; color: var(--plate); }
.sub-title { font-size: var(--fs-xl); margin: 2rem 0 .8rem; color: var(--blue-d); }
.part-tag { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-weight: 800; color: var(--ink-2); font-size: var(--fs-sm); }
.part-tag .kc { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 8px; background: var(--cap); color: var(--magenta); border: 1px solid var(--cap-edge); box-shadow: 0 5px 0 var(--cap-skirt); font-size: 1.2rem; font-weight: 900; }
.goals { display: grid; gap: .7rem; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); counter-reset: g; }
.goals li { position: relative; background: var(--cap); border-radius: 12px; padding: .7rem 1rem .7rem 3rem; border: 1px solid var(--cap-edge); box-shadow: 0 5px 0 var(--cap-skirt); }
.goals li::before { counter-increment: g; content: counter(g, bengali); position: absolute; left: .8rem; top: .75rem; width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--plate); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }

/* keycap card */
.card { position: relative; background: var(--cap); border-radius: 18px; padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--cap-edge); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .04), 0 8px 0 var(--cap-skirt), 0 14px 26px rgba(30, 34, 44, .12); margin-bottom: 8px; }
.card h3 { margin: 0 0 .5rem; font-size: var(--fs-lg); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; color: var(--plate); }
.widget { margin: 1.6rem 0; }
.grid2 { display: grid; gap: 1.2rem; grid-template-columns: 1fr; margin: 1.4rem 0; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.def { margin: 1rem 0; background: #fff; border-left: 6px solid var(--magenta); border-radius: 8px; padding: .8rem 1rem; box-shadow: 0 2px 0 var(--cap-edge); }
.def b:first-child { color: var(--magenta-d); }
.remember { margin: 1.4rem 0 .4rem; background: #fff8e6; border-radius: 12px; padding: .9rem 1rem; border: 2px dashed var(--amber); }
.remember > b:first-child { display: inline-block; background: var(--amber); color: #2a1c02; padding: 0 .6rem; border-radius: 5px; margin-right: .4rem; }
.note { background: #fdecef; border: 2px solid #f2b7c6; border-radius: 10px; padding: .7rem 1rem; }
.note-tag { display: inline-block; font-size: .8rem; background: #fdecef; color: var(--magenta-d); border-radius: 4px; padding: 0 .4rem; font-family: 'Noto Serif Bengali', serif; }
.tight { margin: .4rem 0; padding-left: 1.4rem; }
.tight li { margin: .35rem 0; }
.kgh { list-style: none; padding: 0; }
.kgh li { margin: .4rem 0; padding: .4rem .8rem; background: #fff; border-radius: 8px; border-left: 4px solid var(--amber); }
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig-scroll > svg { display: block; min-width: 620px; width: 100%; height: auto; }

/* controls */
.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: .6rem 0; }
.chips button { border: 2px solid var(--blue); background: #fff; color: var(--blue-d); border-radius: 999px; padding: .05rem .8rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.btn { font: inherit; font-weight: 800; border: 0; background: var(--blue); color: #fff; padding: .3rem 1.05rem; border-radius: 10px; cursor: pointer; box-shadow: 0 4px 0 var(--blue-d); }
.btn.blue { background: var(--blue); }
.btn.magenta { background: var(--magenta); box-shadow: 0 4px 0 var(--magenta-d); }
.btn.green { background: var(--green); box-shadow: 0 4px 0 var(--green-d); }
.btn.amber { background: var(--amber); color: #2a1c02; box-shadow: 0 4px 0 var(--amber-d); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--cap-skirt); box-shadow: 0 3px 0 var(--cap-skirt); }
.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); }
.on-dark { color: #e6e8ee; }
h3.on-dark { color: #fff; margin: 0; font-size: var(--fs-lg); }
p.on-dark { color: #b9bfcc; margin: .6rem 0 0; }

/* story */
.st-qs { display: grid; gap: .5rem; }
.st-q { font: inherit; text-align: left; padding: .55rem .9rem; border-radius: 12px; background: #fff; border: 2px solid var(--cap-edge); box-shadow: 0 4px 0 var(--cap-skirt); cursor: pointer; color: var(--ink); }
.st-q[aria-expanded="true"] { border-color: var(--magenta); box-shadow: 0 4px 0 var(--magenta-d); }
.st-ans { margin-top: .9rem; padding: .8rem 1rem; background: #f1f3f7; border-radius: 12px; min-height: 3.4rem; }
.st-ans a { font-weight: 700; }

/* timeline */
.tl-track { display: flex; gap: .4rem; overflow-x: auto; padding: .4rem .2rem 1rem; position: relative; }
.tl-track button { flex: none; font: inherit; font-weight: 800; padding: .3rem .8rem; border-radius: 8px; background: var(--cap); border: 1px solid var(--cap-edge); box-shadow: 0 5px 0 var(--cap-skirt); cursor: pointer; color: var(--ink); min-width: 4.4rem; }
.tl-track button[aria-selected="true"] { background: var(--plate); color: #fff; box-shadow: 0 5px 0 #11141a; transform: translateY(2px); }
.tl-track button.seen::after { content: ""; display: block; height: 3px; border-radius: 2px; margin-top: .15rem; background: var(--magenta); }
.tl-card { display: grid; gap: .8rem; grid-template-columns: 1fr; align-items: center; background: #fff; border-radius: 12px; padding: .9rem 1rem; min-height: 9rem; border: 1px solid var(--cap-edge); animation: rise .35s both; }
@media (min-width: 720px) { .tl-card { grid-template-columns: 170px 1fr; } }
.tl-card .tl-ic { width: 5.5rem; height: 5.5rem; margin: 0 auto; display: block; }
.tl-card b.yr { display: block; font-size: var(--fs-xl); color: var(--magenta); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* graphite shell (bijoy board, edit workshop) */
.kb-shell { background: var(--plate); border-radius: 20px; padding: clamp(.8rem, 2.5vw, 1.4rem); box-shadow: 0 10px 0 #11141a, 0 22px 36px rgba(20, 24, 32, .28); margin-bottom: 2.2rem; }
.bj-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.bj-status { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bj-mode { font: inherit; font-family: ui-monospace, Menlo, monospace; font-weight: 800; border: 0; border-radius: 8px; padding: .2rem .8rem; cursor: pointer; background: var(--cap); color: var(--ink); box-shadow: 0 4px 0 var(--cap-skirt); }
.bj-mode[aria-pressed="true"] { background: var(--magenta); color: #fff; box-shadow: 0 4px 0 var(--magenta-d); }
.bj-light { font-size: var(--fs-sm); font-weight: 700; color: #b9bfcc; display: inline-flex; align-items: center; gap: .35rem; }
.bj-light::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: #6b7180; }
.bj-light.on { color: #ffb3cf; }
.bj-light.on::before { background: #ff4f8f; box-shadow: 0 0 8px #ff4f8f; }
.doc { background: #fff; color: var(--ink); border-radius: 10px; padding: .7rem 1rem; min-height: 5.2rem; font-family: 'Noto Serif Bengali', serif; font-size: var(--fs-lg); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; box-shadow: inset 0 0 0 2px #d9dce4; }
.doc:focus { outline: none; box-shadow: inset 0 0 0 3px var(--magenta); }
.doc .pend { color: var(--magenta); opacity: .55; }
.caret { display: inline-block; width: 2px; height: 1.2em; background: var(--magenta); vertical-align: -.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bj-keys { display: grid; gap: 5px; margin-top: .8rem; }
.bj-r { display: grid; gap: 5px; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.bj-r.r3 { padding-left: 3%; grid-template-columns: repeat(9, minmax(0, 1fr)); padding-right: 7%; }
.bj-r.r4 { padding-left: 8%; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-right: 22%; }
.key { font: inherit; position: relative; border: 0; border-radius: 7px; background: var(--cap); color: var(--ink); box-shadow: 0 4px 0 var(--cap-skirt); cursor: pointer; padding: .15rem .1rem; min-height: 2.9rem; line-height: 1.1; font-size: .8rem; transition: transform .06s, box-shadow .06s, background .2s; }
.key:active, .key.hit { transform: translateY(3px); box-shadow: 0 1px 0 var(--cap-skirt); background: #ffd9e7; }
.key .lt { position: absolute; left: 4px; top: 2px; font-size: .62rem; color: #8a8f9c; font-weight: 700; }
.key .b1, .key .b2 { display: block; font-family: 'Noto Serif Bengali', serif; }
.key .b2 { font-size: .74rem; color: #8a8f9c; }
.key .b1 { font-size: 1.05rem; font-weight: 700; color: var(--magenta-d); margin-top: .5rem; }
.bj-keys.shift .key .b1 { font-size: .74rem; color: #8a8f9c; font-weight: 400; }
.bj-keys.shift .key .b2 { font-size: 1.05rem; color: var(--magenta-d); font-weight: 700; }
.bj-keys.off .key .b1, .bj-keys.off .key .b2 { opacity: .35; }
.bj-row2 { display: grid; gap: 5px; grid-template-columns: 1fr 2.4fr 1fr 1fr 1fr; margin-top: 5px; }
.key.wide { font-size: .85rem; font-weight: 700; }
.key.space { font-size: .85rem; }
.key.ghost { background: #4a5060; color: #fff; box-shadow: 0 4px 0 #1b1e25; }
.key[aria-pressed="true"] { background: var(--magenta); color: #fff; box-shadow: 0 4px 0 var(--magenta-d); }
@media (max-width: 520px) { .key .lt { font-size: .55rem; } .key .b1 { font-size: .9rem; } .bj-row2 { grid-template-columns: 1fr 1.6fr 1fr 1fr; } .bj-row2 .ghost { grid-column: 1 / -1; } }
.anthem { font-size: var(--fs-xl); font-weight: 800; line-height: 1.6; color: var(--plate); }
.anthem span.done { color: var(--green); }
.anthem span.done::after { content: " ✓"; }
.hint-list { padding-left: 1.4rem; font-size: var(--fs-sm); }
.hint-list li { margin: .2rem 0; }
.jk-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(6.2rem, 100%), 1fr)); }
.jk-grid button { font: inherit; padding: .4rem .3rem; border-radius: 10px; background: #fff; border: 1px solid var(--cap-edge); box-shadow: 0 4px 0 var(--cap-skirt); cursor: pointer; color: var(--ink); }
.jk-grid button b { display: block; font-size: 1.6rem; color: var(--magenta-d); line-height: 1.3; }
.jk-grid button span { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: var(--ink-2); }
.jk-grid button.seen { border-color: var(--magenta); }

/* unicode lanes */
.uc-lanes { display: grid; gap: .6rem; margin: .6rem 0; }
.uc-lane { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; gap: .6rem; align-items: center; background: #f1f3f7; border-radius: 10px; padding: .45rem .7rem; }
.uc-lane .who { font-weight: 800; font-size: var(--fs-sm); }
.uc-lane .keys { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.uc-lane .res { font-weight: 800; font-size: var(--fs-lg); color: var(--blue-d); }
.uc-code { grid-column: 1 / -1; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--green-d); overflow-wrap: anywhere; animation: rise .35s both; }
@media (max-width: 520px) { .uc-lane { grid-template-columns: 1fr auto; } .uc-lane .keys { grid-column: 1 / -1; grid-row: 2; } }

/* special keys */
#sk-svg .zone { cursor: pointer; }
#sk-svg .zone:focus { outline: none; }
#sk-svg .zone:focus rect.hl, #sk-svg .zone.on rect.hl { stroke-width: 5; }
.sk-info { background: #f1f3f7; border-radius: 10px; padding: .7rem 1rem; min-height: 4rem; }
.sk-info b { color: var(--blue-d); }

/* phonetic */
.ph-io { display: grid; gap: .6rem; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 720px) { .ph-io { grid-template-columns: 1fr auto 1fr; } }
.ph-in span, .ph-out span { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.ph-in input { width: 100%; font: inherit; font-family: ui-monospace, Menlo, monospace; font-size: 1.1rem; padding: .45rem .7rem; border-radius: 10px; border: 2px solid var(--cap-skirt); background: #fff; color: var(--ink); }
.ph-in input:focus { border-color: var(--green); outline: none; }
.ph-arrow { font-size: 1.8rem; font-weight: 900; color: var(--green); text-align: center; }
.ph-out output { display: block; min-height: 3rem; padding: .3rem .8rem; background: #eaf6ef; border-radius: 10px; border: 2px solid var(--green); font-size: var(--fs-xl); font-weight: 800; color: var(--green-d); overflow-wrap: anywhere; }
#ph-presets button { border-color: var(--green); color: var(--green-d); }
#ph-presets button[aria-pressed="true"] { background: var(--green); color: #fff; }
.ph-table summary { cursor: pointer; font-weight: 700; margin-top: .6rem; }
.ph-cells { display: grid; gap: .35rem; grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); margin: .6rem 0; }
.ph-cells div { background: #fff; border: 1px solid var(--cap-edge); box-shadow: 0 3px 0 var(--cap-skirt); border-radius: 7px; text-align: center; padding: .15rem 0; line-height: 1.3; }
.ph-cells div b { display: block; font-size: 1.15rem; }
.ph-cells div span { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--green-d); }
.ph-cells div.kar { background: #fff6dc; }
.chart-box { position: relative; height: 280px; margin: .6rem 0; }

/* setup */
.su-win { border-radius: 12px; overflow: hidden; border: 2px solid var(--plate); background: #fff; }
.su-bar { display: flex; align-items: center; gap: .6rem; background: var(--plate); color: #fff; padding: .35rem .7rem; font-size: var(--fs-sm); font-weight: 700; }
.su-dots { display: inline-flex; gap: .3rem; } .su-dots i { width: .7rem; height: .7rem; border-radius: 50%; background: #ff6b6b; } .su-dots i:nth-child(2) { background: #ffbf47; } .su-dots i:nth-child(3) { background: #57d68d; }
.su-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .5rem .7rem; background: #eef0f5; border-bottom: 1px solid #d9dce4; font-size: var(--fs-sm); font-weight: 700; }
.su-tools select { font: inherit; font-weight: 400; border-radius: 6px; border: 1px solid var(--cap-skirt); padding: 0 .3rem; background: #fff; color: var(--ink); max-width: 100%; }
.small-btn { padding: .05rem .7rem; font-size: var(--fs-sm); }
.su-page { min-height: 6rem; padding: .9rem 1rem; font-size: var(--fs-lg); overflow-wrap: anywhere; }
.su-page .garble { font-family: Georgia, 'Times New Roman', serif; color: var(--no); letter-spacing: .02em; }
.su-page .good { color: var(--green-d); font-weight: 800; }
.su-steps { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); list-style: none; padding: 0; margin: .9rem 0 0; counter-reset: s; }
.su-steps li { position: relative; padding: .35rem .6rem .35rem 2.4rem; border-radius: 8px; background: #f1f3f7; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.su-steps li::before { counter-increment: s; content: counter(s, bengali); position: absolute; left: .5rem; top: .4rem; width: 1.4rem; height: 1.4rem; border-radius: 5px; background: #c9cdd6; color: #fff; display: grid; place-items: center; font-size: .85rem; }
.su-steps li.done { background: #eaf6ef; color: var(--green-d); }
.su-steps li.done::before { background: var(--green); }

/* edit */
.ops { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin: 1.2rem 0; }
.op-card { background: var(--cap); border-radius: 14px; padding: .8rem 1rem; border: 1px solid var(--cap-edge); box-shadow: 0 6px 0 var(--cap-skirt); border-top: 5px solid var(--blue); }
.op-card h3 { margin: 0 0 .3rem; font-size: var(--fs-base); display: flex; gap: .2rem; flex-wrap: wrap; align-items: center; }
.op-card p { margin: 0; font-size: var(--fs-sm); }
.clip { font-size: .85rem; color: #ffd27a; background: #1b1e25; padding: .1rem .6rem; border-radius: 6px; max-width: 100%; overflow-wrap: anywhere; font-family: 'Noto Serif Bengali', serif; }
.ed-mission { background: #343a48; color: #fff; border-radius: 10px; padding: .55rem .9rem; margin-bottom: .6rem; font-weight: 700; }
.ed-mission .mi { color: #8fc1ff; }
.ed-mission .ok { color: #8ff0b0; }
.ed-doc { font-size: var(--fs-base); }
.ed-doc .ln { display: block; min-height: 1.8em; }
.ed-doc .w { border-radius: 3px; }
.ed-doc .w.sel { background: #b7d4ff; }
.ed-doc .cur { display: inline-block; width: 2px; height: 1.2em; background: var(--blue); vertical-align: -.2em; margin: 0 1px; animation: blink 1s steps(1) infinite; }
.ed-keys { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); margin-top: .8rem; }
.ed-keys .key { min-height: 2.5rem; font-size: .85rem; font-weight: 700; }
.ed-keys .key.accent { background: #dbe9ff; box-shadow: 0 4px 0 #8fb0dc; }
.ed-keys .key.warn { background: #ffe0e4; box-shadow: 0 4px 0 #d99aa5; }
.combo { min-height: 2.4rem; margin-top: .6rem; display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; color: #fff; font-weight: 700; }
.combo .k { animation: rise .25s both; }
.combo .what { font-family: 'Noto Serif Bengali', serif; color: #b9bfcc; margin-left: .3rem; }

/* format */
.fm-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .fm-grid { grid-template-columns: 1.3fr 1fr; } }
.fm-tools { display: flex; flex-wrap: wrap; gap: .3rem; background: #eef0f5; padding: .4rem; border-radius: 10px 10px 0 0; border: 1px solid #d9dce4; border-bottom: 0; }
.fm-tools button { font: inherit; display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--cap-edge); background: #fff; border-radius: 6px; padding: 0 .45rem; cursor: pointer; color: var(--ink); box-shadow: 0 2px 0 var(--cap-skirt); min-height: 2.2rem; }
.fm-tools button:active { transform: translateY(2px); box-shadow: none; }
.fm-tools small { font-size: .7rem; color: var(--ink-2); }
.al { display: inline-block; width: 18px; height: 14px; background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 4px / 60% 2px no-repeat, linear-gradient(currentColor 0 0) 0 8px / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 12px / 60% 2px no-repeat; }
.al-c { background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 50% 4px / 60% 2px no-repeat, linear-gradient(currentColor 0 0) 0 8px / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 50% 12px / 60% 2px no-repeat; }
.al-r { background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 100% 4px / 60% 2px no-repeat, linear-gradient(currentColor 0 0) 0 8px / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 100% 12px / 60% 2px no-repeat; }
.al-j { background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 4px / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 8px / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 12px / 60% 2px no-repeat; }
.fm-page { background: #fff; border: 1px solid #d9dce4; padding: .8rem 1rem; min-height: 14rem; border-radius: 0 0 10px 10px; }
.fm-page:focus { outline: 3px solid var(--violet); outline-offset: 2px; }
.fm-page.target { border-radius: 10px; opacity: .92; background: #fbfbfd; pointer-events: none; }
.fm-label { margin: 0 0 .3rem; font-weight: 800; color: var(--violet); }
.fm-line { margin: 0 0 .35rem; padding: .1rem .3rem; border-radius: 4px; cursor: pointer; line-height: 1.6; border: 2px solid transparent; }
.fm-line.sel { border-color: var(--violet); background: #f1ecff; }
.fm-checks { list-style: none; padding: 0; font-size: var(--fs-sm); margin: .6rem 0 0; }
.fm-checks li { padding-left: 1.6rem; position: relative; margin: .2rem 0; color: var(--ink-2); }
.fm-checks li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 1rem; height: 1rem; border-radius: 4px; border: 2px solid var(--cap-skirt); }
.fm-checks li.ok { color: var(--ok); font-weight: 700; }
.fm-checks li.ok::before { background: var(--ok); border-color: var(--ok); }

/* print */
.pr-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 720px) { .pr-grid { grid-template-columns: 1fr 300px; } }
.pr-checks label { display: flex; gap: .55rem; align-items: center; margin: .3rem 0; cursor: pointer; }
.pr-checks input { width: 1.2rem; height: 1.2rem; accent-color: var(--amber); }
#pr-svg { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; }

/* file organiser */
.fo-win { border: 2px solid var(--plate); border-radius: 12px; overflow: hidden; background: #fff; }
.fo-path { background: var(--plate); color: #ffd27a; font-weight: 700; padding: .35rem .8rem; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.fo-body { padding: .7rem; min-height: 11rem; }
.fo-files { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr)); }
.fo-item { font: inherit; display: flex; gap: .4rem; align-items: center; text-align: left; padding: .4rem .5rem; border-radius: 8px; border: 1px solid #e1e4ea; background: #f8f9fb; cursor: pointer; color: var(--ink); font-size: var(--fs-sm); overflow-wrap: anywhere; animation: rise .3s both; min-width: 0; }
.fo-item:hover { border-color: var(--amber); }
.fo-item.folder { background: #fff6dc; border-color: #f1d68c; font-weight: 700; }
.fo-item.pick { outline: 3px solid var(--amber); }
.fo-item.found { outline: 3px solid var(--ok); }
.fo-item svg { flex: none; width: 26px; height: 26px; }
.fo-item .ic { flex: none; }

/* report */
.rp-opts { display: grid; gap: .35rem; margin: .6rem 0; }
.rp-opts label { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; padding: .2rem .4rem; border-radius: 6px; }
.rp-opts label:hover { background: #f1f3f7; }
.rp-opts input { margin-top: .45rem; width: 1.1rem; height: 1.1rem; accent-color: var(--amber); flex: none; }
.rp-opts label.bad { color: var(--no); text-decoration: line-through; }
.rp-paper { background: #fff; border-radius: 8px; padding: .8rem 1.1rem; min-height: 6rem; border: 1px solid #e1e4ea; background-image: repeating-linear-gradient(180deg, transparent 0 1.95rem, #eef0f5 1.95rem 2rem); }
.rp-paper h4 { margin: 0 0 .3rem; text-align: center; }
.rp-paper ol { margin: .2rem 0; padding-left: 1.4rem; }
.rp-paper li { animation: rise .3s both; }
.rp-empty { color: var(--ink-2); font-size: var(--fs-sm); }

/* player */
.player { border-radius: 20px; background: var(--plate); padding: clamp(.5rem, 2vw, 1rem); color: #fff; box-shadow: 0 10px 0 #11141a; }
.stage { position: relative; border-radius: 12px; 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(--magenta); 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: 9px; border: 0; background: var(--cap); color: var(--plate); box-shadow: 0 4px 0 var(--cap-skirt); display: grid; place-items: center; cursor: pointer; flex: none; }
.controls input { flex: 1; min-width: 0; accent-color: var(--magenta); }
.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, .35); background: transparent; color: #dce0ea; border-radius: 7px; padding: .1rem .7rem; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chapters button.on { background: var(--magenta); border-color: var(--magenta); color: #fff; }

/* tables */
.table-wrap { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; background: #fff; min-width: 34rem; border-radius: 10px; overflow: hidden; }
.cmp.short { min-width: 0; }
.cmp th, .cmp td { border: 1px solid #d9dce4; padding: .5rem .7rem; text-align: left; vertical-align: top; }
.cmp thead th { background: var(--plate); color: #fff; }
.cmp td:first-child { font-weight: 700; }
.cmp.short td:last-child { white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--blue-d); }
.sc-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr)); }
.sc-item { background: var(--cap); border: 1px solid var(--cap-edge); box-shadow: 0 4px 0 var(--cap-skirt); border-radius: 10px; padding: .45rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.sc-item .kk { display: flex; gap: .15rem; flex-wrap: wrap; }
.sc-item .what { font-size: var(--fs-sm); }

/* shortcut race */
.sr-top { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink-2); }
.sr-q { font-size: var(--fs-lg); font-weight: 800; min-height: 2.6em; margin: .5rem 0; border-radius: 8px; padding: .2rem .4rem; }
.sr-q:focus { outline: 3px dashed var(--blue); }
.sr-btns { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); }
.sr-btns button { font: inherit; font-family: ui-monospace, Menlo, monospace; font-weight: 800; padding: .45rem .6rem; border-radius: 10px; background: #fff; border: 1px solid var(--cap-edge); box-shadow: 0 5px 0 var(--cap-skirt); cursor: pointer; color: var(--ink); }
.sr-btns button.right { background: #dff5e8; border-color: var(--ok); }
.sr-btns button.wrong { background: #ffe3e7; border-color: var(--no); }

/* quiz */
.score-pill { display: inline-block; background: var(--plate); color: #fff; padding: .1rem .9rem; border-radius: 8px; font-weight: 700; }
.lk-q { background: var(--cap); border-radius: 14px; padding: 1rem; margin: .9rem 0; border: 1px solid var(--cap-edge); box-shadow: 0 5px 0 var(--cap-skirt); }
.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 #e1e4ea; border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
.lk-opt:hover { border-color: var(--magenta); }
.lk-opt svg.opt-pic { width: 52px; height: 52px; flex: none; }
.lk-opt-key { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 6px; background: var(--plate); color: #fff; flex: none; font-size: .95rem; font-weight: 800; }
.lk-opt.is-right { border-color: var(--ok); background: #e3f6ea; }
.lk-opt.is-wrong { border-color: var(--no); background: #ffe8eb; }
.lk-explain { margin: .6rem 0 0; }
.lk-explain.ok { color: var(--ok); } .lk-explain.no { color: var(--no); }
.qa details, .cq-parts details { background: #fff; border-radius: 10px; padding: .6rem .9rem; margin: .5rem 0; border-left: 5px solid var(--amber); }
.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: 700; }
.cq-parts { list-style: none; padding: 0; }
.cq-parts details { background: #f6f7fa; }
.summary ul { padding-left: 1.3rem; }
.summary li { margin: .4rem 0; }
.summary h2 { margin-top: 0; }
.new-words { background: #f1f3f7; border-radius: 8px; padding: .5rem .8rem; }

/* pager */
.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(--plate); color: #fff; text-decoration: none; font-weight: 700; box-shadow: 0 5px 0 #11141a; }
.pager-btn.disabled { background: #d3d7df; color: #5d6474; box-shadow: 0 5px 0 #b3b8c3; }
.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: 3px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
