:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#182238;background:#f6f8fc;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}.app-shell{min-height:100vh;display:grid;grid-template-columns:245px minmax(0,1fr)}
.sidebar{background:#10203b;color:#e9efff;padding:28px 16px;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;padding:2px 12px 33px}.brand-mark{width:39px;height:39px;border-radius:13px;background:linear-gradient(145deg,#64a6ff,#436fea);display:grid;place-items:center;font-size:23px;font-weight:700;color:white}.brand strong{display:block;font-size:16px;letter-spacing:-.02em}.brand small{display:block;margin-top:3px;font-size:11px;color:#9cadca}.sidebar nav{display:grid;gap:5px}.nav-item{width:100%;border:0;text-align:left;background:transparent;color:#aab9d4;border-radius:10px;padding:12px 13px;font-weight:600;display:flex;align-items:center;gap:12px}.nav-item span{font-size:18px;width:20px;text-align:center;font-weight:400}.nav-item:hover,.nav-item.active{background:#263d64;color:#fff}.sidebar-footer{margin-top:auto;padding:18px 12px 2px;color:#8b9dbb;font-size:12px;line-height:1.6}
.workspace{min-width:0}.topbar{height:70px;background:#fff;border-bottom:1px solid #e7ebf3;display:flex;justify-content:space-between;align-items:center;padding:0 clamp(22px,4vw,55px);color:#6e7890;font-size:13px}.local-badge{border:1px solid #e3e9f2;padding:8px 11px;border-radius:999px;display:flex;align-items:center;gap:8px}.local-badge i{width:7px;height:7px;background:#42b886;border-radius:50%}main{max-width:1320px;margin:auto;padding:clamp(22px,3.2vw,42px) clamp(22px,4vw,55px) 70px}.page{display:none}.page.active{display:block}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.eyebrow{color:#4775df;font-size:11px;letter-spacing:.15em;font-weight:800;margin:0 0 9px}h1{font-size:clamp(27px,3vw,37px);letter-spacing:-.045em;margin:0 0 7px;line-height:1.2}.subtle{color:#7a849b;margin:0;line-height:1.5}.primary,.secondary,.danger,.ghost{border-radius:10px;padding:11px 16px;border:1px solid transparent;font-size:13px;font-weight:700;white-space:nowrap}.primary{background:#4674e9;color:#fff;box-shadow:0 6px 14px #426fe92a}.primary:hover{background:#315ed5}.primary span{margin-left:7px}.secondary{background:#eef3ff;color:#3e68cc}.secondary:hover{background:#e2eaff}.ghost{background:#fff;border-color:#dbe3f0;color:#465572}.ghost:hover{background:#f5f8fd}.danger{background:#fff2f2;color:#bb5050}.small-btn{font-size:12px;padding:7px 10px}
.card{background:#fff;border:1px solid #e7ebf3;border-radius:17px;box-shadow:0 4px 18px #243b6509;padding:22px}.grid-two{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr);gap:18px}.grid-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.section-title{font-weight:800;font-size:15px;letter-spacing:-.01em;margin:0 0 16px}.kicker{font-size:11px;color:#8791a5;text-transform:uppercase;letter-spacing:.1em;font-weight:800}.feature{background:linear-gradient(125deg,#193862,#315da1);color:#fff;border:0;min-height:237px;position:relative;overflow:hidden}.feature:after{content:"∑";position:absolute;right:18px;bottom:-59px;color:#ffffff12;font-size:220px;font-weight:800}.feature .kicker{color:#a9cbff}.feature h2{font-size:clamp(23px,2.3vw,32px);margin:10px 0 8px;letter-spacing:-.03em}.feature p{color:#d7e5fa;line-height:1.55;max-width:550px}.feature .primary{background:#fff;color:#244f97;position:relative;z-index:1}.feature .stars{color:#ffcc73}.feature-meta{display:flex;flex-wrap:wrap;gap:17px;font-size:13px;margin:17px 0 21px;color:#e5efff}.feature-meta strong{color:#fff}.empty{padding:54px 25px;text-align:center;color:#6f7a90;border:1px dashed #ced9e9;border-radius:17px;background:#fff}.empty strong{display:block;color:#273757;font-size:19px;margin-bottom:8px}.empty p{max-width:470px;margin:0 auto 20px;line-height:1.55}
.metric{padding:19px 21px}.metric strong{display:block;font-size:29px;letter-spacing:-.04em;margin:6px 0}.metric small{color:#8290aa}.metric .accent{color:#4774e8}.section-gap{margin-top:18px}.row-between{display:flex;justify-content:space-between;align-items:center;gap:12px}.tag{display:inline-block;font-size:11px;font-weight:800;padding:5px 9px;border-radius:999px;background:#eef3ff;color:#4d70c5}.tag.green{background:#e8f8f1;color:#24865b}.tag.amber{background:#fff2df;color:#a86b19}.tag.gray{background:#f0f2f6;color:#667187}.stars{letter-spacing:2px;color:#eeac43;white-space:nowrap}.muted{color:#8a94a8}.list-row{border-top:1px solid #edf0f5;padding:14px 0;display:flex;justify-content:space-between;align-items:center;gap:14px}.list-row:first-of-type{border-top:0}.list-row strong{display:block;font-size:13px}.list-row small{display:block;margin-top:5px;color:#8a94a8;font-size:12px}.reason-list{padding-left:17px;margin:13px 0;color:#74819a;font-size:13px;line-height:1.7}.prob-row{display:grid;grid-template-columns:75px minmax(0,1fr) 42px;align-items:center;gap:10px;margin:11px 0;font-size:12px}.prob-row .track{height:8px;background:#e9edf6;border-radius:99px;overflow:hidden}.prob-row .fill{height:100%;background:#93a9db;border-radius:99px}.prob-row.recommended .fill{background:#4775e9}.prob-row.recommended{font-weight:800;color:#304fa0}.prob-row .stars{font-size:13px}
label{font-size:12px;font-weight:700;color:#56627a;display:grid;gap:7px}input,select{width:100%;padding:11px 12px;border:1px solid #dce4ef;border-radius:9px;background:#fff;color:#263754;outline:none}input:focus,select:focus{border-color:#5680e8;box-shadow:0 0 0 3px #5680e81d}.form-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.form-row>*{flex:1 1 170px}.form-row>button{flex:0 0 auto}.stack{display:grid;gap:14px}.notice{background:#fff7e9;border:1px solid #ffebc9;color:#885e24;padding:11px 14px;border-radius:10px;font-size:12px;line-height:1.5}.session-timer{font-size:50px;font-variant-numeric:tabular-nums;font-weight:800;letter-spacing:-.04em;margin:13px 0;color:#315cd0}.session-actions{display:flex;gap:10px;flex-wrap:wrap}.exercise-row{display:grid;grid-template-columns:35px repeat(3,minmax(0,1fr)) 35px;gap:10px;align-items:end;border-top:1px solid #edf0f5;padding:15px 0}.exercise-number{font-weight:800;color:#426dd6;padding-bottom:12px}.icon-btn{background:#f5f7fb;border:0;border-radius:9px;height:41px;color:#7b89a2;font-size:20px}.icon-btn:hover{background:#fff0f0;color:#c34d4d}.result-highlight{border-left:4px solid #56b98d;background:#eefaf4;padding:16px;border-radius:0 9px 9px 0;margin-top:18px}.result-highlight h3{margin:0 0 8px}.result-highlight p{margin:5px 0;color:#466b59}
.priority-card{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:center;border-bottom:1px solid #edf0f5;padding:14px 0}.priority-card:last-child{border-bottom:0}.priority-rank{background:#edf3ff;color:#4370d7;width:30px;height:30px;border-radius:8px;display:grid;place-items:center;font-weight:800;font-size:12px}.priority-card strong{display:block;font-size:14px}.priority-card small{display:block;color:#8190a9;margin-top:4px}.priority-card .stars{font-size:13px}.plan-row{display:flex;gap:15px;padding:12px 0;border-top:1px solid #edf0f5;align-items:center}.plan-row time{min-width:100px;font-weight:800;color:#426ad0;font-size:12px}.plan-row strong{font-size:13px}.chart{width:100%;height:250px;display:block}.chart.short{height:190px}.chart-caption{display:flex;justify-content:space-between;color:#8a95a9;font-size:11px;margin-top:1px}.table-wrap{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:13px}.data-table th{text-align:left;color:#7f8a9e;font-size:11px;text-transform:uppercase;letter-spacing:.07em;padding:13px 10px;border-bottom:1px solid #e9edf3}.data-table td{padding:13px 10px;border-bottom:1px solid #eef1f5}.data-table tr:last-child td{border-bottom:0}.data-table td strong{color:#253753}.history-item{border:1px solid #e7ebf3;background:#fff;border-radius:13px;margin:10px 0;overflow:hidden}.history-item summary{list-style:none;cursor:pointer;padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:12px}.history-item summary::-webkit-details-marker{display:none}.history-item summary:hover{background:#f9fbff}.history-detail{border-top:1px solid #eef1f5;padding:16px 19px;background:#fbfcff}.history-exercise{padding:8px 0;display:flex;justify-content:space-between;border-bottom:1px solid #eef1f5;gap:12px;font-size:12px}.history-exercise:last-child{border:0}.form-error{color:#c34d4d;margin:0;font-size:12px}.chapter-actions{display:flex;gap:6px}.chapter-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-top:1px solid #edf0f5}.chapter-row:first-child{border-top:0}.chapter-row strong{font-size:13px}.chapter-row small{display:block;color:#8592a6;margin-top:4px}.toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:18px}.toolbar label{min-width:220px}
#toast{position:fixed;right:22px;bottom:22px;z-index:10;background:#19345e;color:#fff;padding:13px 18px;border-radius:10px;box-shadow:0 12px 30px #15233b33;max-width:360px;font-size:13px;opacity:0;transform:translateY(8px);pointer-events:none;transition:.18s}#toast.show{opacity:1;transform:translateY(0)}#toast.error{background:#9d3f44}
@media(max-width:950px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;min-height:0;padding:12px 18px}.brand{padding:2px 0 11px}.sidebar nav{display:flex;overflow:auto;gap:4px}.nav-item{width:auto;white-space:nowrap;font-size:12px;padding:9px}.sidebar-footer{display:none}.topbar{height:56px}.grid-two{grid-template-columns:1fr}}@media(max-width:620px){main{padding:22px 16px 50px}.topbar{padding:0 16px}.local-badge{display:none}.page-heading{align-items:flex-start;flex-direction:column}.grid-three{grid-template-columns:1fr}.exercise-row{grid-template-columns:30px 1fr 1fr 35px}.exercise-row label:nth-child(4){grid-column:2/4}.priority-card{grid-template-columns:30px 1fr}.priority-card>.stars{grid-column:2}.history-item summary{align-items:flex-start;flex-direction:column}}

[hidden] { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 460px); }
.auth-card h1 { font-size: 28px; margin-top: 28px; }
.auth-card .stack { margin: 24px 0 16px; }
#auth-error { color: #a82d32; margin: 0; }
#account-name { display: inline-block; overflow-wrap: anywhere; margin: 10px 0; }
.auth-card input { width: 100%; }
textarea{font:inherit;width:100%;padding:11px 12px;border:1px solid #dce4ef;border-radius:9px;background:#fff;color:#263754;resize:vertical}
textarea:focus{outline:none;border-color:#5680e8;box-shadow:0 0 0 3px #5680e81d}
.bib-summary{max-height:170px;overflow:auto;white-space:pre-wrap;font-size:13px;line-height:1.55;color:#34435d;background:#f7f9fd;padding:12px;border-radius:9px}
.bib-preview{font-size:12px;color:#667187}.bib-preview summary{cursor:pointer}.bib-preview p{max-height:160px;overflow:auto;white-space:pre-wrap;line-height:1.5;background:#f7f9fd;padding:12px;border-radius:9px}
.chat-log{max-height:340px;overflow:auto;margin:14px 0;padding:12px;background:#f7f9fd;border-radius:10px}
.chat-message{padding:10px 12px;margin:8px 0;background:#fff;border-radius:9px;font-size:13px;line-height:1.5}
.chat-message.user{background:#eaf0ff}.chat-message strong{display:block;color:#3559ae;margin-bottom:4px}.chat-message p{margin:0;white-space:pre-wrap}
.exercise-row{grid-template-columns:35px repeat(4,minmax(0,1fr)) 35px}
.chapter-actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:750px){.exercise-row{grid-template-columns:30px repeat(2,minmax(0,1fr)) 35px}.exercise-row label:first-of-type{grid-column:2/4}}
[hidden] { display: none !important; }
.drop-zone { display: block; border: 2px dashed #9eb6e5; border-radius: 12px; padding: 28px; text-align: center; background: #f7faff; cursor: pointer; }
.drop-zone input { display: block; margin: 12px auto 0; max-width: 100%; }
.card-edit { border: 1px solid #dce5f0; border-radius: 10px; padding: 16px; margin-top: 14px; }
.card-edit label { display: block; margin-top: 10px; }
.card-edit textarea { width: 100%; min-height: 64px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.activation-result input { width: 100%; margin: 8px 0; }
.check-label { display: flex; gap: 8px; align-items: center; }
.check-label input { width: auto; padding: 0; }
