.ct-overlay[hidden]{display:none!important}.ct-overlay{position:fixed;inset:0;z-index:12010;display:flex;justify-content:center;align-items:center;padding:15px}.ct-shade{position:absolute;inset:0;background:rgba(13,22,37,.63)}.ct-panel{position:relative;max-width:950px;width:100%;max-height:min(88vh,800px);background:var(--surface,#fff);color:var(--text,#1f2937);border-radius:18px;box-shadow:0 12px 70px #0003;overflow:hidden;display:flex;flex-direction:column}.ct-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid #d5dce6}.ct-header strong{font-size:19px;display:block}.ct-header small{font-size:12px;color:#64748b}.ct-header button{border:0;border-radius:9px;padding:4px 11px;background:#edf2f7;color:#111;font-size:28px;cursor:pointer}.ct-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:17px}.ct-layout{display:grid;grid-template-columns:minmax(195px,240px) minmax(0,1fr);gap:20px}.ct-categories{display:grid;align-content:start;gap:6px;max-height:67vh;overflow:auto}.ct-category{width:100%;display:flex;justify-content:space-between;gap:7px;align-items:center;border:1px solid #d7dfec;border-radius:9px;background:transparent;color:inherit;padding:10px 12px;text-align:left;cursor:pointer;font-size:13px}.ct-category.selected{background:#e6efff;border-color:#4b7bd5;color:#1f4b91;font-weight:700}.ct-category em{font-style:normal;white-space:nowrap;color:#64748b}.ct-content{min-width:0}.ct-topic-title{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:6px}.ct-topic-title h3{margin:0;font-size:19px}.ct-topic-title span{color:#64748b;font-size:12px}.ct-tip{font-size:13px;color:#546477;line-height:1.6}.ct-modes{display:flex;gap:8px;margin:14px 0}.ct-modes button,.ct-actions button{background:#f4f6fa;border:1px solid #cbd5e1;padding:9px 11px;border-radius:9px;color:inherit;cursor:pointer}.ct-modes .selected{background:#dceafe;border-color:#5182d4;color:#214f95;font-weight:700}.ct-explain{font-size:13px;line-height:1.7}.ct-source-list{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.ct-source-list span{font-size:12px;background:#edf2f7;color:#40506a;border-radius:6px;padding:6px 9px}.ct-primary{width:100%;padding:13px;border:0;background:#245dc4;color:white;border-radius:11px;font-weight:700;font-size:15px;cursor:pointer}.ct-primary:disabled,.ct-actions button:disabled{opacity:.45;cursor:not-allowed}.ct-footer{border-top:1px solid #e2e8f0;margin-top:24px;padding-top:12px;color:#64748b;font-size:12px;line-height:1.6}.ct-item{line-height:1.75}.ct-source,.ct-memory-meta{font-size:12px;color:#64748b;margin:10px 0}.ct-stem{font-size:15px;font-weight:600;white-space:pre-wrap;margin:12px 0}.ct-option{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid #e2e8f0;border-radius:7px;margin:6px 0;font-size:13px}.ct-option b{flex:none}.ct-option span{white-space:pre-wrap;overflow-wrap:anywhere}.ct-reveal{margin:14px 0;background:#eef5ff;padding:12px;border-radius:9px;white-space:pre-wrap;font-size:13px}.ct-reveal[hidden]{display:none}.ct-review{color:#9a4b06;background:#fff6dc;padding:10px;border-radius:8px;font-size:13px}.ct-material{border:1px solid #c9d7e7;border-radius:9px;background:#f7faff;padding:12px;margin:14px 0}.ct-material summary{cursor:pointer;font-weight:600;font-size:13px}.ct-material>div{margin-top:8px;white-space:pre-wrap;font-size:13px;line-height:1.75;max-height:240px;overflow:auto}.ct-actions{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.ct-fatal{color:#a51919;line-height:1.8}.ct-open{overflow:hidden}@media(max-width:640px){.ct-overlay{padding:0;align-items:flex-end}.ct-panel{max-height:92dvh;border-radius:17px 17px 0 0}.ct-body{padding:12px}.ct-layout{display:block}.ct-categories{display:flex;overflow-x:auto;max-height:none;padding:0 0 10px;margin-bottom:12px;scroll-snap-type:x proximity}.ct-category{width:auto;min-width:130px;max-width:175px;flex-shrink:0;font-size:12px;scroll-snap-align:start}.ct-topic-title h3{font-size:17px}.ct-header{padding:12px 15px}.ct-header strong{font-size:17px}.ct-modes button{flex:1}}
/* Reusable topic-practice preferences; only topic mode, not stored answers. */
.ct-preferences{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
.ct-preferences label{display:flex;align-items:center;gap:8px;flex:1 1 205px;padding:11px 12px;border:1px solid #cfdbeb;border-radius:10px;background:#f8fbff;line-height:1.4;font-size:13px;cursor:pointer}
.ct-preferences input{accent-color:#265fc5;width:17px;height:17px;flex:none}
