
:root{--ink:#10243e;--muted:#617086;--line:#dfe6ee;--paper:#f7f9fc;--white:#fff;--accent:#183b68;--good:#19734b;--goodbg:#eaf7f0;--bad:#a83838;--badbg:#fff0f0;--blue:#e5edff;--shadow:0 10px 30px rgba(16,36,62,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}button,input{font:inherit}a{color:inherit;text-decoration:none}.wrap{width:min(1060px,calc(100% - 32px));margin:auto}header{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center}.nav{display:flex;align-items:center;width:100%;gap:18px}.brand{font-weight:850;font-size:21px;display:flex;align-items:center;margin-right:auto}.mark{width:38px;height:38px;border-radius:9px;background:var(--ink);display:grid;place-items:center;margin-right:9px;color:#fff;font-family:"Times New Roman",serif;font-size:30px}.brand em{font-style:normal;color:#55708f}.back{font-size:14px;color:#52677f;font-weight:700}.present{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px 14px;font-weight:750;cursor:pointer}main{padding:38px 0 60px}.top{margin-bottom:22px}.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:12px;font-weight:850;color:#61748a}.top h1{font-size:38px;letter-spacing:-1.4px;margin:7px 0 5px}.top p{margin:0;color:var(--muted)}.setup,.game{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);overflow:hidden}.setup{padding:26px}.setup h2{margin:0 0 6px}.setup>p{margin:0 0 24px;color:var(--muted)}.label{font-size:13px;font-weight:850;margin:20px 0 9px}.choices{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.choice{border:1px solid var(--line);background:#f7f9fc;border-radius:12px;padding:13px;text-align:left;cursor:pointer;color:var(--ink);font-weight:800}.choice small{display:block;color:var(--muted);font-weight:600;margin-top:3px}.choice.active{background:var(--accent);color:#fff;border-color:var(--accent)}.choice.active small{color:#dbe5f2}.counts{display:flex;gap:9px;flex-wrap:wrap}.count{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px 17px;font-weight:800;cursor:pointer}.count.active{background:var(--accent);color:#fff}.toggleline{display:flex;align-items:center;gap:9px;margin-top:20px;color:var(--muted);font-size:14px}.start{margin-top:22px;border:0;border-radius:11px;padding:14px 22px;background:var(--ink);color:#fff;font-weight:850;cursor:pointer}.game{display:none}.gamehead{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px}.levelname{font-weight:850}.stats{display:flex;gap:9px;flex-wrap:wrap}.stat{background:#f2f5f9;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800}.body{padding:34px 28px;text-align:center}.prompt{font-size:19px;color:var(--muted);font-weight:750}.number{font-size:64px;font-weight:900;letter-spacing:7px;margin:15px 0 20px;font-variant-numeric:tabular-nums}.placewrap{max-width:760px;margin:0 auto 22px}.places{display:grid;grid-template-columns:repeat(8,1fr);gap:5px;margin-bottom:5px}.places span{font-size:12px;font-weight:850;color:var(--muted);padding:7px 2px;background:#f2f5f9;border-radius:7px}.bits{display:grid;grid-template-columns:repeat(8,1fr);gap:7px}.bit{border:1px solid var(--line);background:#fff;border-radius:11px;min-height:58px;font-size:26px;font-weight:900;color:var(--ink);cursor:pointer}.bit.on{background:var(--accent);color:#fff}.decimalInput{width:min(260px,90%);font-size:38px;font-weight:850;text-align:center;border:2px solid var(--line);border-radius:13px;padding:11px;margin:0 auto 18px;color:var(--ink)}.actions{display:flex;justify-content:center;gap:10px;margin-top:20px}.primary,.secondary{border:0;border-radius:11px;padding:13px 20px;font-weight:850;cursor:pointer}.primary{background:var(--ink);color:#fff}.secondary{background:#edf2f8;color:var(--ink)}.feedback{min-height:45px;margin-top:16px;font-weight:850}.good{color:var(--good)}.bad{color:var(--bad)}.explain{max-width:720px;margin:12px auto 0;color:var(--muted);font-size:14px;line-height:1.5}.help{margin-top:18px;background:#eef3f8;border-radius:15px;padding:17px 20px;color:#52677f;font-size:14px;line-height:1.55}.help b{color:var(--ink)}.exitPresent{display:none;position:fixed;right:16px;top:16px;z-index:20;border:0;background:var(--ink);color:#fff;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer}body.present header,body.present .presentOnlyHide{display:none}body.present .exitPresent{display:block}body.present main{padding:14px 0}body.present .wrap{width:min(1280px,calc(100% - 24px))}body.present .game{min-height:calc(100vh - 28px);display:flex!important;flex-direction:column}body.present .body{flex:1;display:flex;flex-direction:column;justify-content:center}body.present .number{font-size:82px}.problemLink{position:fixed;right:18px;bottom:16px;z-index:30;border:1px solid var(--line);background:#fff;color:#52677f;border-radius:999px;padding:9px 13px;font-size:12px;font-weight:800;box-shadow:0 6px 20px rgba(16,36,62,.10);cursor:pointer}.problemPanel{display:none;position:fixed;inset:0;z-index:60;background:rgba(16,36,62,.34);padding:18px;align-items:center;justify-content:center}.problemPanel.open{display:flex}.problemCard{width:min(520px,100%);background:#fff;border-radius:18px;padding:22px}.problemCard textarea,.problemCard select{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;margin:6px 0 12px}.problemActions{display:flex;justify-content:flex-end;gap:9px}@media(max-width:700px){.choices{grid-template-columns:1fr 1fr}.number{font-size:43px}.top h1{font-size:31px}.back{display:none}.bit{min-height:50px;font-size:22px}.body{padding:26px 12px}}

/* Polar Pattern Challenge */
[hidden]{display:none!important}
.question-type{text-transform:uppercase;letter-spacing:.1em;font-size:12px;font-weight:850;color:#61748a;margin-bottom:12px}
.polar-prompt{font-size:clamp(21px,3vw,28px);line-height:1.35;letter-spacing:-.5px;max-width:850px;margin:0 auto 18px}
.diagram{max-width:360px;margin:0 auto 22px}
.polar-chart{width:100%;height:auto;display:block}
.diagram-caption{font-size:12px;color:var(--muted);line-height:1.5}
.answer-hint{font-size:14px;color:var(--muted);margin:12px auto 18px}
.polar-answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:800px;margin:auto}
.polar-answer{border:2px solid var(--line);background:#fff;border-radius:12px;min-height:56px;padding:14px 18px;cursor:pointer;font-weight:750;color:var(--ink);line-height:1.4}
.polar-answer:hover:not(:disabled){background:#f2f5f9;border-color:#aebed1}
.polar-answer.selected{background:#e5edff;border-color:#183b68}
.polar-answer.correct{background:#eaf7f0;border-color:#19734b;color:#145c3d}
.polar-answer.wrong{background:#fff0f0;border-color:#a83838;color:#a83838}
.polar-answer:disabled{cursor:default;opacity:1}
button:focus-visible,a:focus-visible{outline:3px solid #55708f;outline-offset:3px}
.explain{background:#eef3f8;border-radius:12px;padding:14px 18px;text-align:left}
.explain:empty{display:none}
.play-again{margin-top:18px}
.help a{text-decoration:underline;display:inline-block;margin-top:9px}
body.present .polar-prompt{font-size:clamp(24px,3vw,36px)}
body.present .polar-answer{font-size:20px;min-height:62px}
body.present .diagram{max-width:380px}
body.present .resultCard{display:block!important}
body.present .problemLink{display:none}
@media(max-width:560px){.choices,.polar-answers{grid-template-columns:1fr}.gamehead{align-items:flex-start;flex-direction:column;gap:10px}.setup{padding:20px}.diagram{max-width:300px}.polar-answer{padding:12px}.actions{flex-wrap:wrap}.body{padding:24px 14px}}

/* All binary rows share the same columns and spacing at every level. */
.places,.bits,.binary-digits{display:grid;grid-template-columns:repeat(var(--bit-count,8),minmax(0,1fr));gap:7px}
.places span,.binary-digits span{min-width:0;text-align:center}
.binary-question{margin-top:15px}
.binary-digits{font-size:clamp(28px,6vw,64px);font-weight:900;font-variant-numeric:tabular-nums;line-height:1.3}
.bit:disabled{background:#f2f5f9;color:#617086;cursor:default}
.bit-instruction{margin:0 auto 18px;max-width:760px;color:var(--muted);font-size:15px;line-height:1.6}
body.present .bit-instruction{font-size:20px}
body.present .binary-digits{font-size:clamp(32px,7vw,82px)}

/* Reserved advertising framework */
.ad-slot{border:1px solid #dfe6ee;background:#fff;border-radius:12px;display:flex;align-items:center;justify-content:center;text-align:center;color:#8a98a9;min-height:96px;margin:22px auto;padding:14px;max-width:970px}.ad-slot .ad-label{font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.ad-slot .ad-copy{font-size:12px;margin-top:4px}.ad-sidebar{min-height:250px;max-width:300px}.ad-bottom{margin-top:28px;margin-bottom:8px}.tool-with-ad{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:22px;align-items:start}.tool-with-ad>.ad-slot{margin:0;width:100%;min-height:250px}.brandmarkbox{width:42px;height:42px;margin-right:10px;border-radius:10px;background:#10243e;display:grid;place-items:center;flex:0 0 42px}.brandmark{width:28px;height:34px;display:block}.brandword em{font-style:normal;color:#55708f}
@media(max-width:900px){.tool-with-ad{display:block}.tool-with-ad>.ad-slot{display:none}}
body.present .ad-slot{display:none!important}

/* Unified MusicClassLab site header */
header{height:72px!important;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center}
.nav{height:72px;display:flex;align-items:center;width:100%;gap:18px}
.brand{font-weight:850!important;font-size:22px!important;letter-spacing:-.6px;display:flex;align-items:center;margin-right:auto;white-space:nowrap}
.brandmarkbox{width:42px;height:42px;margin-right:10px;border-radius:10px;background:#10243e;display:grid;place-items:center;flex:0 0 42px}
.brandmark{width:28px;height:34px;display:block}
.brandword em,.brand em{font-style:normal;color:#55708f}
.back{font-size:14px;color:#52677f;font-weight:700;white-space:nowrap}
.present{white-space:nowrap}
@media(max-width:620px){.brand{font-size:19px!important}.brandmarkbox{width:38px;height:38px;flex-basis:38px}.brandmark{width:25px;height:31px}.nav{gap:10px}.present{padding:9px 10px;font-size:12px}}

.resultCard{margin:22px auto 0;max-width:620px;padding:22px;border:1px solid #cbd8e6;border-radius:16px;background:#f7fbff;text-align:center}.resultCard h3{margin:0 0 8px;color:#12395b}.resultCode{font:800 clamp(16px,4vw,28px)/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:1px;color:#12395b;background:white;border:2px dashed #8aa7bf;border-radius:12px;padding:14px;margin:14px 0}.resultMeta{font-size:14px;color:#526575}.resultActions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:14px}.prototypeNote{font-size:12px;color:#667785;margin-top:10px}.present .resultCard{display:none!important}
