:root{
  --bg:#f6f8fc;--panel:#fff;--ink:#172033;--muted:#69758a;--line:#dce4ef;
  --accent:#2f67d8;--accent-dark:#1f54bd;--accent-soft:#edf3ff;
  --good:#157a52;--good-soft:#eef9f4;--bad:#b43b3b;--bad-soft:#fff3f3;
  --shadow:0 14px 38px rgba(32,49,79,.075);--radius:18px
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}
button,select{font:inherit;color:inherit}
button:focus-visible,select:focus-visible{outline:3px solid rgba(47,103,216,.22);outline-offset:2px}

.topbar{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}
.brand{display:flex;gap:10px;align-items:center;border:0;background:transparent;padding:0;cursor:pointer;text-align:left}
.brand-mark{width:32px;height:32px;border-radius:9px;background:#15213c;color:#fff;display:grid;place-items:center;font-weight:900;font-size:14px}
.brand-copy{display:flex;gap:8px;align-items:baseline}.brand b{font-size:15px}.brand small{color:var(--muted);font-weight:600;font-size:11px}
.top-actions{display:flex;gap:8px}.ghost,.back-home{border:1px solid var(--line);background:#fff;border-radius:9px;padding:7px 11px;cursor:pointer;font-weight:650}.ghost:hover,.back-home:hover{background:#f8fafc}

.hero{max-width:1040px;margin:64px auto 30px;padding:0 28px}.eyebrow{text-transform:uppercase;letter-spacing:.13em;color:var(--accent);font-size:11px;font-weight:850}.hero h1{font-size:46px;letter-spacing:-.035em;margin:8px 0 12px}.hero p{font-size:16px;line-height:1.75;color:var(--muted);max-width:760px}
.subject-grid{max-width:1040px;margin:0 auto;padding:0 28px 70px;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.subject-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;min-height:224px;box-shadow:var(--shadow);cursor:pointer;display:flex;flex-direction:column;gap:14px;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.subject-card:hover{transform:translateY(-3px);border-color:#c9d6ea;box-shadow:0 20px 44px rgba(32,49,79,.1)}.subject-card.disabled{opacity:.46;cursor:default;transform:none;box-shadow:none}.subject-card-top{display:flex;justify-content:space-between;align-items:center}.subject-icon{font-size:29px}.subject-arrow{font-size:20px;color:#9aa7ba}.subject-card h2{margin:0;font-size:22px}.subject-card p{color:var(--muted);line-height:1.55;flex:1;margin:8px 0 0}.subject-meta{font-weight:800;color:var(--accent);font-size:13px}

.shell{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:calc(100vh - 56px)}
.sidebar{background:#fff;border-right:1px solid var(--line);padding:18px 15px;position:sticky;top:56px;height:calc(100vh - 56px);overflow:auto}.sidebar-top{padding:0 3px}.back-home{margin-bottom:15px}.side-title{font-size:18px;font-weight:850;margin-bottom:19px}.filter-group+.filter-group{margin-top:18px}.filter-label{text-transform:uppercase;letter-spacing:.105em;font-size:9px;color:var(--muted);font-weight:850;margin:0 0 8px 3px}.pill-row{display:flex;flex-wrap:wrap;gap:6px}.pill,.topic{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 9px;cursor:pointer;color:#3a475a;line-height:1.25}.pill{font-size:13px}.pill.active,.topic.active{background:var(--accent-soft);border-color:#adc3f1;color:var(--accent-dark);font-weight:800}.topic-list{display:grid;gap:7px}.topic{text-align:left;font-size:13px}

.content{padding:24px 26px 42px;min-width:0}.practice-card{max-width:1120px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;scroll-margin-top:72px}.practice-head{padding:14px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff}.practice-meta{min-width:0}.meta-line{display:flex;gap:6px;flex-wrap:wrap}.meta-chip{display:inline-flex;align-items:center;min-height:24px;padding:4px 8px;border-radius:999px;background:#f5f7fb;border:1px solid #e7ebf2;color:#556277;font-size:11px;font-weight:750}.subject-chip{background:var(--accent-soft);border-color:#d5e2fb;color:var(--accent-dark)}.subcrumb{margin-top:6px;color:var(--muted);font-size:11px;font-weight:600}.head-right{display:flex;align-items:center;gap:8px;flex:none}.mini-progress{width:88px;height:5px;border-radius:999px;background:#e9edf4;overflow:hidden}.mini-progress span{display:block;height:100%;background:var(--accent);border-radius:999px}.done-count{font-size:11px;color:var(--muted);font-weight:750}.practice-head select{border:1px solid var(--line);border-radius:9px;padding:7px 9px;background:#fff;font-size:13px}

.question-area{padding:34px 48px 30px;max-width:980px;margin:0 auto}.question-kicker{display:flex;align-items:center;gap:9px;color:#8a96a8;font-size:10px;text-transform:uppercase;letter-spacing:.11em;font-weight:850;margin-bottom:12px}.question-number{width:32px;height:32px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:14px;letter-spacing:0;font-weight:900;display:grid;place-items:center}.question-stem{font-size:25px;line-height:1.48;letter-spacing:-.012em;margin:0 0 24px;font-weight:760}
.passage{background:#fbfcfe;border:1px solid var(--line);border-radius:14px;padding:20px 22px;margin:0 0 24px;line-height:1.72;color:#293448}.passage h3{margin:0 0 12px;font-size:18px}.passage p{margin:8px 0}.visual-box,.choice-strip-wrap{margin:18px auto 26px;max-width:760px;text-align:center}.visual-box{padding:8px}.visual-box img,.choice-strip{display:block;max-width:100%;max-height:440px;margin:auto;object-fit:contain;border-radius:10px}.choice-strip-wrap{background:#fbfcfe;border:1px solid var(--line);border-radius:14px;padding:14px}.choice-strip-labels{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px;margin-top:10px;font-weight:900;color:var(--muted);font-size:12px}

.answer-list{display:grid;gap:10px;margin-top:16px}.answer-option{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:13px;border:1.5px solid var(--line);background:#fff;border-radius:13px;padding:13px 15px;cursor:pointer;text-align:left;min-height:62px;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease}.answer-option:hover:not(:disabled){border-color:#9db7ec;background:#fbfdff;box-shadow:0 4px 15px rgba(47,103,216,.055)}.answer-option.selected:not(.correct-choice):not(.wrong-choice){border-color:var(--accent);background:var(--accent-soft)}.answer-option:disabled{cursor:default;opacity:1}.answer-option .letter{width:31px;height:31px;border-radius:50%;border:1px solid #bdc8d7;display:grid;place-items:center;font-weight:900;flex:none;font-size:13px}.answer-option.selected:not(.correct-choice):not(.wrong-choice) .letter{background:var(--accent);color:#fff;border-color:var(--accent)}.answer-option.correct-choice{border-color:#58a985;background:var(--good-soft)}.answer-option.correct-choice .letter{background:var(--good);border-color:var(--good);color:#fff}.answer-option.wrong-choice{border-color:#dc8888;background:var(--bad-soft)}.answer-option.wrong-choice .letter{background:var(--bad);border-color:var(--bad);color:#fff}.answer-option img{max-width:220px;max-height:130px;object-fit:contain;justify-self:end}.answer-text{font-size:17px;line-height:1.45;color:#303b4d}.result-icon{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#d9f1e6;color:var(--good);font-weight:950}.result-icon.wrong{background:#f7dddd;color:var(--bad)}

.action-row{display:flex;align-items:center;gap:10px;margin-top:20px;min-height:40px}.submit-btn,.retry-btn,.next-inline{border:0;border-radius:10px;padding:10px 17px;font-weight:850;cursor:pointer}.submit-btn{background:var(--accent);color:#fff}.submit-btn:hover:not(:disabled){background:var(--accent-dark)}.submit-btn:disabled{opacity:.36;cursor:not-allowed}.retry-btn{background:#eef2f7;color:#455166}.next-inline{background:#172033;color:#fff}.action-hint{font-size:11px;color:#98a3b4}.submitted-actions{justify-content:flex-start}

.feedback{margin-top:22px;border-radius:15px;padding:19px 20px;border:1px solid var(--line);background:#fff}.feedback.correct{border-color:#b9dfcf;background:#fbfefc}.feedback.incorrect{border-color:#edc8c8;background:#fffdfd}.feedback-status{display:flex;align-items:center;gap:11px}.feedback-badge{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:950;background:var(--good);color:#fff}.feedback.incorrect .feedback-badge{background:var(--bad)}.feedback-title{font-size:18px;font-weight:900;color:var(--good)}.feedback.incorrect .feedback-title{color:var(--bad)}.feedback-subtitle{font-size:11px;color:var(--muted);margin-top:2px}.answer-summary{margin-top:16px;padding:13px 15px;border-radius:11px;background:#f7f9fc;display:flex;align-items:baseline;justify-content:space-between;gap:16px}.answer-summary span{font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:900;color:var(--muted)}.answer-summary strong{text-align:right}.explanation{margin-top:16px;padding-top:15px;border-top:1px solid #e8edf3}.explanation span{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:900;color:#647186}.explanation p{margin:8px 0 0;line-height:1.68;font-size:15px;color:#2d394b}

.question-nav{border-top:1px solid var(--line);padding:13px 18px;display:flex;align-items:center;gap:12px;justify-content:space-between;background:#fff}.question-nav>button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 11px;cursor:pointer;font-size:13px;font-weight:700}.question-nav>button:hover:not(:disabled){background:#f8fafc}.question-nav>button:disabled{opacity:.32}.q-dots{display:flex;gap:5px;flex-wrap:wrap;justify-content:center}.q-dot{width:29px;height:29px;border:1px solid var(--line);background:#fff;border-radius:8px;cursor:pointer;font-size:10px}.q-dot.active{border-color:var(--accent);color:var(--accent);font-weight:900;box-shadow:inset 0 0 0 1px var(--accent)}.q-dot.done{background:#eef8f4;border-color:#a9dac8}.q-dot.active.done{border-color:var(--accent);background:var(--accent-soft)}

.drawer{position:fixed;inset:0;background:rgba(17,25,39,.35);display:none;justify-content:flex-end;z-index:60}.drawer.open{display:flex}.drawer-card{width:min(500px,94vw);height:100%;background:#fff;box-shadow:-12px 0 35px rgba(0,0,0,.15);padding:22px;overflow:auto}.drawer-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.drawer-head b{font-size:20px}.drawer-head button{border:0;background:#eef2f7;border-radius:8px;width:34px;height:34px;font-size:20px;cursor:pointer}.progress-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:13px 0;border-bottom:1px solid var(--line)}.progress-row>div{display:grid;gap:3px}.progress-row span{font-weight:800}.progress-row small{display:block;font-size:10px;color:var(--muted);font-weight:650;margin-top:3px}.progress-row>b{text-align:right}.muted{color:var(--muted);font-size:12px;line-height:1.55}.danger-link{margin-top:8px;border:1px solid #efcaca;background:#fff;color:var(--bad);border-radius:9px;padding:9px 12px;cursor:pointer;font-weight:750}.empty{padding:50px;text-align:center;color:var(--muted)}

@media(max-width:980px){
  .shell{display:block}.sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:12px 14px;background:#fff}.sidebar-top{display:flex;align-items:center;gap:10px}.back-home{margin:0}.side-title{margin:0;font-size:16px}.filter-group{margin-top:10px!important}.filter-label{margin-bottom:6px}.pill-row,.topic-list{display:flex;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px;scrollbar-width:none}.pill-row::-webkit-scrollbar,.topic-list::-webkit-scrollbar{display:none}.pill,.topic{white-space:nowrap;flex:none}.content{padding:16px}.practice-card{max-width:900px}.question-area{padding:30px 34px}.practice-head{padding:12px 16px}
}

@media(max-width:640px){
  .topbar{height:52px;padding:0 12px}.brand-copy small{display:none}.brand-mark{width:30px;height:30px}.ghost{padding:6px 9px;font-size:12px}.shell{min-height:calc(100vh - 52px)}.sidebar{padding:10px 11px}.content{padding:8px}.practice-card{border-radius:13px}.practice-head{padding:11px 12px;align-items:flex-start}.meta-line{gap:4px}.meta-chip{font-size:9px;min-height:21px}.head-right{gap:5px}.mini-progress{display:none}.done-count{font-size:10px}.practice-head select{max-width:108px;padding:6px 7px;font-size:11px}.question-area{padding:22px 15px 20px}.question-kicker{margin-bottom:10px}.question-number{width:30px;height:30px}.question-stem{font-size:20px;line-height:1.5;margin-bottom:20px}.passage{padding:16px 15px;font-size:14px;line-height:1.7}.visual-box,.choice-strip-wrap{margin:14px auto 20px;padding:5px}.visual-box img,.choice-strip{max-height:340px}.answer-option{grid-template-columns:32px minmax(0,1fr) auto;padding:11px 12px;min-height:58px;gap:10px}.answer-option .letter{width:29px;height:29px}.answer-text{font-size:15px}.answer-option img{grid-column:2 / -1;justify-self:start;max-width:100%;max-height:150px;margin-top:6px}.action-row{margin-top:16px;flex-wrap:wrap}.action-hint{width:100%}.feedback{padding:16px 14px}.answer-summary{display:grid;gap:5px}.answer-summary strong{text-align:left}.question-nav{position:sticky;bottom:0;z-index:8;padding:10px 9px;background:rgba(255,255,255,.97);backdrop-filter:blur(8px)}.question-nav>button{font-size:11px;padding:7px 8px}.q-dots{max-height:66px;overflow:auto;gap:4px}.q-dot{width:27px;height:27px}.hero{margin-top:38px;padding:0 20px}.hero h1{font-size:35px}.hero p{font-size:14px}.subject-grid{grid-template-columns:1fr;padding:0 20px 50px}.subject-card{min-height:190px}
}
