/* EduMath 2: komponen khusus (memakai tema/palet dari app.css) */
:root { --ink:#1E293B; --muted:#64748B; --card:#fff; --line:#bae6fd; --soft:#F0F9FF; --ok:#15803D; --okbg:#DCFCE7; --bad:#B91C1C; --badbg:#FEE2E2; --acc:#20CEE2; --seg:#7DD3FC; }
html[data-theme="dark"] { --ink:#e2e8f0; --muted:#94a3b8; --card:#1a1f26; --line:#2b3a44; --soft:#0b2a30; --ok:#86efac; --okbg:#052e1c; --bad:#fda4af; --badbg:#4c0519; --seg:#38bdf8; }
.header-stats .chip-ic { fill: currentColor; }
.muted { color: var(--muted); font-size: .875rem; font-weight: 600; }
.work { display: grid; gap: .875rem; grid-template-columns: minmax(0,1fr); align-items: start; }
@media (min-width: 1024px) { .work { grid-template-columns: 7fr 5fr; gap: 1.25rem; } .steps-panel { position: sticky; top: 1rem; } }
.q-panel, .steps-panel, .menu-panel { display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
.q-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.q-tag { padding: .25rem .75rem; border-radius: 999px; background: var(--soft); color: #0E7490; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
html[data-theme="dark"] .q-tag { color: #67e8f9; }
.q-lv { font-weight: 800; font-size: .75rem; color: var(--muted); }
.q-text { font-size: 1.25rem; line-height: 1.4; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
@media (min-width: 640px) { .q-text { font-size: 1.6rem; } }
.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.15; margin: 0 .2em; font-family: var(--pmb-font-mono); }
.fr i { font-style: normal; padding: 0 .25em; } .fr i:first-child { border-bottom: .12em solid currentColor; }
.q-vis { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.bar { display: flex; width: 9rem; max-width: 100%; height: 1.5rem; border: 2px solid var(--seg); border-radius: .5rem; overflow: hidden; }
.bar b { flex: 1; border-right: 2px solid var(--seg); background: transparent; } .bar b:last-child { border-right: 0; } .bar b.on { background: var(--acc); }
.bar-w { display: flex; flex-direction: column; gap: .2rem; font-size: .75rem; font-weight: 800; color: var(--muted); }
.q-input { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.q-input input { width: 8rem; min-height: 3.25rem; text-align: center; font: 700 1.5rem var(--pmb-font-mono); border: 2px solid var(--line); border-radius: 1rem; background: var(--card); color: var(--ink); }
.q-input input:focus { outline: none; border-color: var(--acc); }
.q-input input[readonly] { opacity: .75; }
.q-input .stack { display: inline-flex; flex-direction: column; gap: .25rem; align-items: center; } .q-input .stack input { width: 6rem; } .q-input .stack hr { width: 100%; border: 0; border-top: 3px solid var(--ink); margin: 0; }
.q-input .unit { font-weight: 800; color: var(--muted); }
.q-fb { min-height: 1.5rem; font-weight: 800; } .q-fb.ok { color: var(--ok); } .q-fb.bad { color: var(--bad); }
.q-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-main, .btn-ghost { min-height: 2.75rem; padding: 0 1.25rem; border-radius: 1rem; font-weight: 800; font-size: .95rem; border: 2px solid transparent; }
.btn-main { background: #0ea5e9; color: #fff; box-shadow: 0 3px 0 #0369a1; font-family: var(--pmb-font-display); }
.btn-main.next { background: #10b981; box-shadow: 0 3px 0 #047857; }
.btn-ghost { background: var(--card); color: #0369a1; border-color: var(--line); } html[data-theme="dark"] .btn-ghost { color: #7dd3fc; } .btn-ghost.danger { color: var(--bad); align-self: flex-start; }
.q-steps { display: flex; flex-direction: column; gap: .5rem; } .q-steps p { margin: 0; line-height: 1.5; color: var(--ink); font-weight: 700; font-size: .95rem; }
.q-steps .st { padding: .5rem .75rem; border-radius: .75rem; background: var(--soft); }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem; } @media (min-width: 768px) { .topics { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.topic-btn, .lv-btn { min-height: 3.25rem; border-radius: 1rem; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; padding: .4rem; }
.topic-btn .ic { font: 800 1.35rem var(--pmb-font-display); color: #0891B2; } .topic-btn small { font-size: .7rem; font-weight: 700; color: var(--muted); }
.topic-btn[aria-pressed="true"], .lv-btn[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #083344; } .topic-btn[aria-pressed="true"] .ic, .topic-btn[aria-pressed="true"] small { color: #083344; }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; max-width: 30rem; }
.menu-panel .btn-ghost { min-height: 2.75rem; } #tab-menu { display: flex; flex-direction: column; gap: .875rem; }
@media (min-width: 640px) { #tab-menu { gap: 1.25rem; } }
.header-stats .chip-value { font-size: .8125rem; }
.topic-btn .ic { white-space: nowrap; }
@media (max-width: 359.98px) { .topics { grid-template-columns: repeat(2, minmax(0,1fr)); } }
/* Soal bertahap */
.prog { display: flex; align-items: center; gap: .75rem; }
#q-step { font-weight: 800; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.prog-bar { flex: 1; height: .6rem; border-radius: 999px; background: var(--soft); overflow: hidden; }
.prog-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #00B8FF, #10b981); transition: width .3s; }
.q-prompt { padding: .75rem 1rem; border-radius: 1rem; background: var(--soft); font-weight: 700; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.q-steps .st.done { background: var(--okbg); } .q-steps .st.hint { background: var(--soft); border: 2px dashed var(--seg); }
.btn-ghost:disabled { opacity: .45; }
