:root{--ctg-font:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--ctg-brand-bg:#0f172a;--ctg-brand-fg:#e2e8f0;--ctg-bar-bg:var(--ctg-brand-bg);--ctg-bar-fg:var(--ctg-brand-fg);--ctg-bar-pad-y:.5rem;--ctg-bar-pad-x:1rem;--ctg-bar-gap:.5rem;--ctg-btn-radius:6px;--ctg-btn-pad-y:.4rem;--ctg-btn-pad-x:.7rem;--ctg-btn-font:.85rem;--ctg-ghost-bg:#1e293b;--ctg-ghost-bg-hover:#334155;--ctg-ghost-fg:#e2e8f0;--ctg-logout-bg:#dc2626;--ctg-logout-fg:#fff;--ctg-login-card-bg:#fff;--ctg-login-card-fg:#0f172a;--ctg-login-radius:14px}.appbar{padding:var(--ctg-bar-pad-y) var(--ctg-bar-pad-x);background:var(--ctg-bar-bg);color:var(--ctg-bar-fg);font-family:var(--ctg-font);flex:none;justify-content:space-between;align-items:center;display:flex}.appbar__brand{align-items:center;gap:.55rem;display:flex}.ctg-logo{flex:none;display:block}@keyframes ctg-logo-draw{0%{stroke-dashoffset:1px}to{stroke-dashoffset:0}}.ctg-logo .l-bubble,.ctg-logo .l-tail,.ctg-logo .l-rcf,.ctg-logo .l-toco{stroke-dasharray:1;stroke-dashoffset:1px;animation:.45s forwards ctg-logo-draw}.ctg-logo .l-bubble{animation-duration:.5s;animation-delay:0s}.ctg-logo .l-tail{animation-duration:.2s;animation-delay:.4s}.ctg-logo .l-toco{animation-duration:.4s;animation-delay:.6s}.ctg-logo .l-rcf{animation-duration:.45s;animation-delay:1s}@media (prefers-reduced-motion:reduce){.ctg-logo .l-bubble,.ctg-logo .l-tail,.ctg-logo .l-rcf,.ctg-logo .l-toco{stroke-dashoffset:0;animation:none}}.appbar__title{letter-spacing:-.01em;font-size:1.1rem;font-weight:600}.appbar__back{color:var(--ctg-bar-fg);border-radius:var(--ctg-btn-radius);cursor:pointer;justify-content:center;align-items:center;padding:.15rem .4rem;font-size:1.15rem;line-height:1;text-decoration:none;display:inline-flex}.appbar__back:hover{background:var(--ctg-ghost-bg)}.appbar__actions{align-items:center;gap:var(--ctg-bar-gap);display:flex}.appbar__divider{background:#ffffff2e;width:1px;height:1.4rem;margin:0 .2rem}.btn-ghost,.btn-logout{border-radius:var(--ctg-btn-radius);padding:var(--ctg-btn-pad-y) var(--ctg-btn-pad-x);cursor:pointer;font-size:var(--ctg-btn-font);border:none;align-items:center;gap:.35rem;line-height:1.2;display:inline-flex}.btn-ghost{background:var(--ctg-ghost-bg);color:var(--ctg-ghost-fg)}.btn-ghost:hover{background:var(--ctg-ghost-bg-hover)}.btn-logout{background:var(--ctg-logout-bg);color:var(--ctg-logout-fg)}.login{background:var(--ctg-brand-bg);height:100dvh;font-family:var(--ctg-font);justify-content:center;align-items:center;display:flex}.login__card{background:var(--ctg-login-card-bg);color:var(--ctg-login-card-fg);border-radius:var(--ctg-login-radius);width:min(90vw,380px);padding:2rem 2.25rem;box-shadow:0 10px 30px #00000040}.login__card h1{margin:0 0 .25rem;font-size:1.5rem}.login__card>p{color:#475569;margin:0 0 1.25rem}.login__card form{flex-direction:column;gap:.6rem;display:flex}.login__card input{box-sizing:border-box;border:1px solid #cbd5e1;border-radius:8px;width:100%;min-width:0;padding:.55rem .7rem;font-family:inherit;font-size:.95rem}.login__card button{box-sizing:border-box;background:var(--ctg-brand-bg);color:#fff;cursor:pointer;border:none;border-radius:8px;width:100%;padding:.55rem 1rem;font-family:inherit;font-size:1rem}.login__note{color:#94a3b8;margin:1rem 0 0;font-size:.8rem;line-height:1.4}:root{--ctg-panel:#1e293b;--ctg-border:#334155;--ctg-muted:#94a3b8;--ctg-accent:#38bdf8}.ctg-sidebar{background:var(--ctg-brand-bg);width:280px;color:var(--ctg-brand-fg);font-family:var(--ctg-font);flex-direction:column;flex-shrink:0;gap:.75rem;padding:1rem;display:flex;overflow:hidden}.ctg-sidebar__label{color:var(--ctg-muted);margin:0;font-size:.8rem;font-weight:600}.ctg-sidebar__hint{color:var(--ctg-muted);margin:0;padding:.4rem .2rem;font-size:.78rem}.ctg-toggle{background:var(--ctg-panel);border:1px solid var(--ctg-border);cursor:pointer;border-radius:8px;align-items:center;gap:.5rem;padding:.5rem .6rem;font-size:.85rem;display:flex}.ctg-list{border-top:1px solid var(--ctg-border);flex:1;margin:0;padding:.5rem 0 0;list-style:none;overflow-y:auto}.ctg-row,.ctg-subrow{text-align:left;width:100%;color:var(--ctg-brand-fg);cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;gap:.4rem;font-family:inherit;display:flex}.ctg-row{padding:.4rem .5rem;font-size:.85rem}.ctg-subrow{color:#cbd5e1;padding:.35rem .5rem .35rem 1.5rem;font-size:.8rem}.ctg-row:hover,.ctg-subrow:hover{background:var(--ctg-panel)}.ctg-row.is-open{background:var(--ctg-panel);font-weight:600}.ctg-subgroup{background:#1e293b73;border-radius:6px;margin:0 0 .25rem;padding:2px 0;list-style:none}.ctg-status{flex:none;align-items:center;display:inline-flex}.ctg-status--free{color:#22c55e}.ctg-status--priority{color:#fb923c}.ctg-btn-primary{cursor:pointer;width:100%;font-family:var(--ctg-font);color:#fff;background:#16a34a;border:none;border-radius:8px;padding:.55rem 1rem;font-size:.9rem}.ctg-btn-primary:disabled{opacity:.6;cursor:default}.ctg-speed{background:var(--ctg-panel);border:1px solid var(--ctg-border);border-radius:8px;flex-direction:column;gap:.4rem;padding:.6rem;font-size:.85rem;display:flex}.ctg-speed__opts{justify-content:space-between;display:flex}.ctg-speedbar{z-index:2000;font-family:var(--ctg-font);background:#ffffffeb;border:1px solid #cbd5e1;border-radius:999px;align-items:center;gap:2px;padding:3px 5px;display:inline-flex;position:absolute;bottom:28px;right:12px;box-shadow:0 2px 6px #0000001f}.ctg-speedbar__btn{color:#334155;cursor:pointer;background:0 0;border:none;border-radius:999px;padding:2px 9px;font-family:inherit;font-size:12px;line-height:1.5}.ctg-speedbar__btn.is-active{color:#06283d;background:#38bdf8;font-weight:600}.ctg-speedbar__unit{color:#64748b;padding:0 6px 0 4px;font-size:11px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.tutor{flex-direction:column;height:100dvh;display:flex}.tutor__panes{flex:auto;min-height:0;display:flex}.tutor__chat{background:#f8fafc;border-right:1px solid #e2e8f0;flex-direction:column;flex:0 0 648px;width:648px;max-width:60vw;min-height:0;display:flex}.tutor__viewer{background:#fff;flex:auto;min-width:0}.tutor__resume{color:#0e7490;background:#ecfeff;border-bottom:1px solid #cffafe;padding:8px 12px;font-size:12.5px}.chat{flex-direction:column;flex:auto;min-height:0;display:flex}.chat__messages{flex-direction:column;flex:auto;gap:.6rem;padding:1rem;display:flex;overflow-y:auto}.bubble{white-space:pre-wrap;border-radius:12px;max-width:90%;padding:.55rem .75rem;font-size:.92rem;line-height:1.4}.bubble--tutor{color:#0f172a;background:#e2e8f0;border-bottom-left-radius:4px;align-self:flex-start}.bubble--student{color:#06263a;background:#38bdf8;border-bottom-right-radius:4px;align-self:flex-end}.bubble--correct{color:#14532d;background:#dcfce7;border-left:4px solid #16a34a}.bubble--defensible{color:#713f12;background:#fef9c3;border-left:4px solid #ca8a04}.bubble--incorrect{color:#7f1d1d;background:#fee2e2;border-left:4px solid #dc2626}.chat__input{border-top:1px solid #e2e8f0;flex-direction:column;gap:.5rem;padding:.6rem;display:flex}.chat__input textarea{resize:vertical;border:1px solid #cbd5e1;border-radius:8px;width:100%;min-height:120px;padding:.5rem;font-family:inherit;font-size:.92rem}.chat__input button{align-self:flex-end}.chat__input button,.tutor__validate button{color:#fff;cursor:pointer;background:#0f172a;border:none;border-radius:8px;padding:.5rem .9rem;font-size:.9rem}.tutor__validate{border-top:1px solid #e2e8f0;padding:.6rem}.tutor__validate button{background:#16a34a;width:100%}.tutor__validate button:disabled{opacity:.5;cursor:not-allowed}.tutor__validate .btn-next{background:#0f172a;margin-top:.5rem}.tutor__hint,.tutor__error{color:#475569;margin:1.5rem;font-size:.95rem}.tutor__error{color:#b91c1c}.tutor__summary{color:#334155;margin:.6rem 0 0;font-size:.85rem;line-height:1.4}.bubble__link{color:#0369a1;font-weight:600;text-decoration:none}.bubble__link:hover{text-decoration:underline}.resources{background:#fff;flex-direction:column;height:100dvh;display:flex}.resources__bar{color:#e2e8f0;background:#0f172a;flex:none;align-items:center;gap:1rem;padding:.5rem 1rem;display:flex}.resources__title{flex:auto;font-weight:600}.resources__toggle{cursor:pointer;align-items:center;gap:.35rem;font-size:.85rem;display:flex}.resources__panes{flex:auto;min-height:0;display:flex}.resources__list{background:#f8fafc;border-right:1px solid #e2e8f0;flex-direction:column;flex:0 0 380px;width:380px;max-width:45vw;display:flex;overflow-y:auto}.resources__search{background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:.6rem .75rem;position:sticky;top:0}.resources__search input{border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:.45rem .6rem;font-size:.9rem}.resources__doc-item{cursor:pointer;background:#fff;border:1px solid #e2e8f0;border-radius:10px;margin:.5rem .6rem;padding:.6rem .7rem;position:relative}.resources__doc-lang{color:#475569;letter-spacing:.02em;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:999px;padding:1px 6px;font-size:.65rem;font-weight:600;position:absolute;top:.5rem;right:.5rem}.resources__doc-item:hover{border-color:#cbd5e1}.resources__doc-item--active{border-color:#38bdf8;box-shadow:0 0 0 2px #38bdf840}.resources__doc-title{color:#0f172a;padding-right:6rem;font-size:.9rem;font-weight:600;line-height:1.3}.resources__doc-meta{color:#94a3b8;margin-top:.15rem;font-size:.75rem;font-weight:500;line-height:1.3}.resources__doc-desc{color:#64748b;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:.3rem;font-size:.72rem;line-height:1.4;display:-webkit-box;overflow:hidden}.resources__doc-item--active .resources__doc-desc{-webkit-line-clamp:unset;overflow:visible}.pdfview{background:#475569;flex:auto;min-width:0;display:flex}.pdfview__frame{border:none;flex:auto;width:100%;height:100%}.tutor__mode{background:#fff;border-bottom:1px solid #e2e8f0;gap:6px;padding:8px 12px;display:flex}.tutor__mode button{color:#334155;cursor:pointer;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:6px;flex:1 1 0;padding:6px 10px;font-size:13px}.tutor__mode button.is-active{color:#fff;background:#38bdf8;border-color:#38bdf8;font-weight:600}.tutor__modal{z-index:50;background:#0f172a73;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.tutor__modal-card{background:#fff;border-radius:10px;max-width:380px;padding:20px 22px;box-shadow:0 10px 30px #0003}.tutor__modal-card p{color:#1e293b;margin:0 0 16px;font-size:14px;line-height:1.5}.tutor__modal-actions{justify-content:flex-end;gap:10px;display:flex}.tutor__modal-actions button{color:#334155;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:6px;padding:7px 16px;font-size:13px}.tutor__modal-actions button:last-child{color:#fff;background:#2563eb;border-color:#2563eb;font-weight:600}.tutor__intake-opt{color:#075985;cursor:pointer;background:#e0f2fe;border:1px solid #38bdf8;border-radius:6px;flex:1 1 0;padding:9px 12px;font-size:13px}.tutor__intake-opt:hover:not(:disabled){background:#bae6fd;border-color:#38bdf8}.tutor__intake-opt:disabled{opacity:.5;cursor:default}.chat__composer-top{background:#f8faff;border-top:1px solid #e2e8f0;padding:.6rem}.tutor__intake-choices{flex-wrap:wrap;gap:.5rem;display:flex}
