:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1a251e;background:#f2f4ea;font-size:15px;line-height:1.55;--blue:#2450f5;--line:#d7ddce;--muted:#687165;--paper:#fffef9}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button,.button{cursor:pointer;border:1px solid #b9c2b0;border-radius:8px;padding:9px 15px;background:var(--paper);color:inherit;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-weight:600;white-space:nowrap}button:hover,.button:hover{border-color:var(--blue);color:var(--blue)}button:disabled{opacity:.45;cursor:default}.primary{background:var(--blue);border-color:var(--blue);color:white}.primary:hover{background:#153dd5;color:white}.danger{color:#a53324}.quiet{border:0;background:none;padding:6px 10px}a{color:var(--blue)}input,select,textarea{padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:white;color:inherit;min-width:0}textarea{resize:vertical;width:100%}label{display:grid;gap:6px;font-size:13px;color:var(--muted)}h1,h2,h3,p{margin-top:0}h1{font-size:34px;letter-spacing:-1px;line-height:1.2}h2{font-size:20px}h3{font-size:16px}.muted,small{color:var(--muted)}.app-header{display:flex;align-items:center;gap:36px;padding:18px 32px;border-bottom:1px solid var(--line);background:var(--paper)}.brand{display:flex;align-items:center;gap:10px;color:#17251c;font-size:26px;font-weight:850;letter-spacing:-1px;text-decoration:none}.brand span{display:grid;place-items:center;background:#d7f85a;border-radius:10px;width:38px;height:38px}.app-header nav{display:flex;gap:8px}.app-header #account{margin-left:auto;font-size:13px;display:flex;align-items:center;gap:12px}#app{max-width:1280px;margin:40px auto;padding:0 28px}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:28px}.eyebrow{color:var(--blue);font-size:12px;font-weight:750;letter-spacing:2px;margin-bottom:10px}.card{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:24px}.login{max-width:440px;margin:10vh auto}.login form{display:grid;gap:20px}.development{background:#f1f6de;border:1px solid #d3dfa6;border-radius:8px;padding:12px;font-size:13px}.workspace{display:grid;grid-template-columns:210px minmax(0,1fr);gap:24px}.folders{display:flex;flex-direction:column;gap:7px}.folders a{padding:9px 12px;border-radius:7px;color:inherit;text-decoration:none}.folders a.selected{background:#e3e9d9;font-weight:700}.folders form{display:grid;gap:8px;margin-top:18px}.filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}.filters input{flex:1;min-width:160px}.tags{display:flex;flex-wrap:wrap;gap:6px}.tag{font-size:12px;border-radius:5px;padding:3px 8px;background:#eef0e9;color:#3e5146}.tag.blue{background:#e7edff;color:#2450bd}.tag.green{background:#e6f2d7;color:#426825}.tag.red{background:#fae9e3;color:#a43a20}.empty{padding:50px 20px;text-align:center;color:var(--muted)}.inline-form{display:grid;grid-template-columns:1fr 160px auto;gap:12px;align-items:end;margin-bottom:24px}.detail-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:24px}.stack{display:grid;gap:20px}.actions{display:flex;flex-wrap:wrap;gap:9px}.job{padding:16px 0;border-top:1px solid var(--line)}.job:first-child{border-top:0}.job-heading{display:flex;justify-content:space-between;gap:16px;margin-bottom:8px}.job progress{width:100%;height:6px;accent-color:var(--blue)}.job p{font-size:13px;margin:7px 0}.job .actions{margin-top:10px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.stat strong{display:block;font-size:32px;line-height:1.2;margin-bottom:6px}.stat span{font-size:13px;color:var(--muted)}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:12px;color:var(--muted);font-weight:600}.scroll-table{overflow-x:auto}details summary{cursor:pointer;font-weight:600}details[open] summary{margin-bottom:16px}pre{white-space:pre-wrap;word-break:break-word;max-height:400px;overflow:auto;font-size:12px}.media-video{width:100%;background:#171d19;border-radius:9px;margin:12px 0}.artifact{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}.artifact:first-child{border:0;margin-top:0;padding-top:0}.edit-grid{display:grid;gap:14px;margin:16px 0}.admin-config{display:grid;grid-template-columns:1fr 1fr;gap:20px}.admin-config label{margin:10px 0}.account-limit{display:flex;gap:6px}.account-limit input{width:70px}.error{color:#a33920;background:#fff2e9;border-radius:8px;padding:12px}#notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:min(600px,90vw);background:#20342a;color:white;border-radius:9px;padding:12px 20px;box-shadow:0 6px 24px #15282020;z-index:30;display:none}#notice.show{display:block}.source-preview{font-size:14px;white-space:pre-wrap;max-height:240px;overflow:auto}.source-images{display:flex;gap:8px;overflow:auto;margin-top:12px}.source-images img{max-height:180px;max-width:100%;object-fit:contain}.pagination{display:flex;align-items:center;justify-content:space-between;margin-top:20px}@media(max-width:850px){.workspace,.detail-grid{grid-template-columns:1fr}.folders{flex-direction:row;flex-wrap:wrap;align-items:center}.folders form{margin:0;display:flex}.app-header{padding:14px 18px;gap:16px;flex-wrap:wrap}.app-header #account{font-size:11px}.stats{grid-template-columns:1fr 1fr}.inline-form{grid-template-columns:1fr}.admin-config{grid-template-columns:1fr}}@media(max-width:540px){#app{margin:26px auto;padding:0 16px}.page-heading{display:block}.page-heading .actions{margin-top:14px}.app-header nav{order:3;width:100%}h1{font-size:29px}.card{padding:18px}}
:root .app-header nav{gap:20px}:root .app-header nav a{text-decoration:none;font-weight:600}.detail-grid>section,.detail-grid>aside{display:flex;flex-direction:column;gap:20px}.job-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.status{font-size:12px;padding:3px 9px;background:#edf0e8;border-radius:99px}.status.complete{background:#e5f2eb;color:#26704d}.status.failed{background:#fff0e5;color:#a14120}.status.running{background:#e8edff;color:#2450f5}.local-note{background:#f1f6de;border:1px solid #d3dfa6;border-radius:8px;padding:12px;font-size:13px}.folders button.selected{background:#e6edff;border-color:#a7b9ff;color:#2450f5}.card>h2{margin-bottom:12px}

[hidden]{display:none!important}
.library-heading{align-items:center;margin:48px 0 38px}.library-heading h1{margin-bottom:12px}.library-heading p{margin-bottom:0}
.folders>strong{font-size:12px;color:var(--muted);font-weight:600;padding:0 12px;margin-bottom:6px}
.folders>button{border:0;justify-content:flex-start;background:transparent;padding:11px 14px;font-size:14px}
.folders>button.selected{background:#e6ebd9;color:#263727}
.folder-add{margin:14px 10px}.folder-add summary{font-size:13px;color:var(--muted);list-style:none}.folder-add summary::-webkit-details-marker{display:none}.folder-add form{margin-top:12px}.folder-add input{width:100%}
.library-empty{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:28px;align-items:center;min-height:380px;padding:48px;background:var(--paper);border:1px solid var(--line);border-radius:20px}
.empty-kicker{display:block;font-size:12px;letter-spacing:.08em;color:var(--muted);margin-bottom:20px}.empty-copy h2{font-size:30px;line-height:1.25;letter-spacing:-.7px;margin-bottom:18px;color:#1a251e}.empty-copy p{color:var(--muted);line-height:1.8;max-width:350px;margin-bottom:26px}.empty-copy .button{gap:22px;padding:12px 18px}.empty-copy small{display:block;font-size:12px;margin-top:14px}.search-empty{grid-template-columns:1fr;min-height:300px}
.lesson-stack{position:relative;height:228px;margin:15px}.stack-back{position:absolute;inset:10px -6px -4px 10px;border-radius:14px;background:#e7eed6;border:1px solid #d4ddc4;transform:rotate(7deg)}.stack-page{position:relative;height:100%;background:white;border:1px solid #d7ddce;border-radius:14px;padding:23px;transform:rotate(-5deg);box-shadow:0 12px 28px #2039230a}.stack-label{font-size:9px;letter-spacing:.16em;color:#75816d;font-weight:700}.stack-line{display:block;height:7px;background:#e9ede4;border-radius:8px;margin-top:12px}.stack-line.short{width:66%;background:#465943;margin-top:23px}.stack-line.medium{width:75%}.stack-diagram{display:flex;gap:4px;height:34px;margin:20px 0}.stack-diagram span{flex:1;background:#e9ede4;border-radius:4px}.stack-diagram span:nth-child(-n+2){background:#d7f85a}.stack-play{position:absolute;bottom:-17px;right:-15px;display:grid;place-items:center;padding-left:3px;width:53px;height:53px;border:5px solid var(--paper);border-radius:50%;background:var(--blue);color:white;font-size:17px}
@media(max-width:1000px){.library-empty{padding:32px;grid-template-columns:minmax(0,1fr) 180px;gap:18px}.lesson-stack{margin:10px 0}}
@media(max-width:850px){.folder-add{margin:0}.folder-add form{flex-wrap:wrap}.library-heading{margin-top:28px}.folders>strong{width:100%}}
@media(max-width:540px){.library-heading{margin:24px 0}.library-heading>.button{margin-top:20px}.library-empty{display:block;padding:32px 24px;min-height:0}.empty-copy h2{font-size:27px}.lesson-stack{display:none}.folders{gap:4px}.folder-add{margin-left:8px}}

.project-list-head,.project-row{display:grid;grid-template-columns:38px minmax(0,1fr) 115px 125px 16px;gap:16px;align-items:center}
.project-list-head{padding:0 18px 10px;color:var(--muted);font-size:12px}
.project-list{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--paper);overflow:hidden}
.project-list>li+li{border-top:1px solid var(--line)}
.project-row{padding:16px 18px;min-height:78px;color:inherit;text-decoration:none;transition:background .15s}
.project-row:hover,.project-row:focus-visible{background:#f3f6ec}.project-row:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.project-symbol{display:grid;place-items:center;width:36px;height:42px;background:#edf1e3;border-radius:8px;color:#596c47}.project-symbol svg{width:23px;height:23px}
.project-row-main{min-width:0}.project-row h2{font-size:16px;line-height:1.45;margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.project-row .tags:empty{display:none}.project-row .tags:not(:empty){margin-top:6px;gap:5px}.project-row .tag{font-size:11px;padding:2px 6px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-row-folder,.project-row time{font-size:12px;color:var(--muted)}.project-row-folder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-row time{font-variant-numeric:tabular-nums}.project-row-arrow{font-size:22px;color:#899380}
@media(max-width:1050px){.project-list-head,.project-row{grid-template-columns:32px minmax(0,1fr) 85px 110px 12px;gap:10px}.project-row,.project-list-head{padding-left:14px;padding-right:14px}.project-symbol{width:30px;height:38px}}
@media(max-width:600px){.project-list-head{display:none}.project-row{grid-template-columns:32px minmax(0,1fr) auto 12px;row-gap:6px;padding:14px;min-height:0}.project-symbol{grid-column:1;grid-row:1/3;align-self:start}.project-row-main{grid-column:2/4;grid-row:1}.project-row h2{font-size:15px}.project-row-folder{grid-column:2;grid-row:2}.project-row time{grid-column:3;grid-row:2;font-size:11px}.project-row-arrow{grid-column:4;grid-row:1/3}.project-row .tag{max-width:145px}}

.project-row-excerpt{margin:5px 0 0;font-size:13px;line-height:1.8;color:#65705f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-row-excerpt .katex{font-size:1em}.project-row-excerpt .katex-display{display:inline-block;margin:0;vertical-align:middle}
.project-row .tag.type{color:#3d5b9d;background:#edf1fb}
@media(max-width:600px){.project-row-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:anywhere;font-size:12px}}

.library-status-filters{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 14px}.library-status-filters button{border:0;background:transparent;padding:6px 9px;font-size:12px;font-weight:500;color:#6b7664}.library-status-filters button[aria-pressed=true]{background:#e3e9d9;color:#263727}.library-status-filters .product-icon{width:15px;height:15px}.project-list>li{position:relative}.project-title-line{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}.project-row-tools{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;flex-direction:row;gap:3px}.project-row-tools a,.project-row-tools button{border:0;background:transparent;box-shadow:none;display:grid;place-items:center;padding:5px;border-radius:5px;color:#7c8974}.project-row-tools a:hover,.project-row-tools button:hover{background:#e7ecde;color:#2450f5}.project-row-tools .product-icon{width:15px;height:15px;margin:0}.project-list-head,.project-row{grid-template-columns:38px minmax(0,1fr) 100px 115px 110px}@media(max-width:1050px){.project-list-head,.project-row{grid-template-columns:30px minmax(0,1fr) 75px 105px 110px}}@media(max-width:600px){.project-row{grid-template-columns:30px minmax(0,1fr) auto 22px}.project-row>span:last-child{grid-column:4;grid-row:1/3}.project-state{font-size:10px}.project-row-tools{position:static;transform:none;justify-content:flex-end;padding:0 12px 10px}.project-row{grid-template-columns:30px minmax(0,1fr) auto 0}}

.library-heading{margin-bottom:22px}.library-overview{display:flex;align-items:center;flex-wrap:wrap;gap:12px 28px;margin:0 0 28px;padding-bottom:20px;border-bottom:1px solid #dde3d4}.library-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px 28px;flex:1;min-width:0}.library-summary>div{display:flex;align-items:center;gap:7px;color:#7a8572;font-size:12px}.library-overview .product-icon{width:16px;height:16px;margin:0}.library-overview strong{font-size:18px;font-weight:650;color:#31402b;font-variant-numeric:tabular-nums;margin-left:3px}@media(max-width:600px){.library-overview{gap:10px 18px;margin-bottom:22px}.library-summary{gap:10px 18px}.library-overview strong{font-size:16px}}

.library-search{display:flex;align-items:center;gap:8px;flex:1;min-width:200px;border:1px solid var(--line);border-radius:8px;background:white;padding:0 10px;color:var(--muted)}
.library-search:focus-within{border-color:var(--blue);box-shadow:0 0 0 2px #2450f512}.library-search>input{width:100%;min-width:0;padding:10px 0;border:0;outline:none;background:transparent}.library-search input::-webkit-search-cancel-button{display:none}.library-search>button{border:0;background:transparent;padding:5px;color:var(--muted)}.library-search .product-icon{margin:0;width:16px;height:16px;flex-shrink:0}
.filter-menu{position:relative}.filter-menu>summary{display:flex;align-items:center;gap:5px;list-style:none;border:1px solid var(--line);border-radius:8px;background:var(--paper);padding:10px 14px;font-size:14px;font-weight:500}.filter-menu>summary::-webkit-details-marker{display:none}.filter-menu>summary::after{content:'';width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin:-3px 0 0 8px}.filter-menu[open]>summary{margin:0;border-color:#a7b9ff;color:var(--blue)}.filter-options{position:absolute;top:calc(100% + 7px);right:0;z-index:5;background:var(--paper);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 25px #20392314;width:max-content;min-width:180px;max-width:min(300px,calc(100vw - 32px));max-height:300px;overflow:auto;padding:7px}.filter-options label{display:flex;align-items:flex-start;gap:9px;padding:8px;border-radius:6px;font-size:13px;color:inherit;cursor:pointer;overflow-wrap:anywhere}.filter-options label:hover{background:#eef2e7}.filter-options input{flex:none;min-width:0;margin:4px 0 0;accent-color:var(--blue)}.filter-options p{font-size:12px;white-space:normal;padding:8px;max-width:220px;margin:0}
.selected-filters{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:-3px 0 18px}.selected-filters:empty{display:none}.filter-chip{padding:4px 8px;border:1px solid #d8e0f3;border-radius:6px;background:#edf1fb;color:#365298;font-size:12px;font-weight:500;max-width:100%;white-space:normal;text-align:left}.filter-chip span{overflow-wrap:anywhere}.filter-chip .product-icon{width:13px;height:13px;margin:0 0 0 6px;flex-shrink:0}.selected-filters>.quiet{font-size:12px;color:var(--muted);font-weight:400;padding:4px 8px}
@media(max-width:600px){.library-search{flex-basis:100%;min-width:0}.filters{gap:8px}.filter-menu>summary,.filters>select{font-size:13px;padding:9px 10px}.filter-options{left:0;right:auto;max-width:min(230px,calc(100vw - 32px))}}

.project-breadcrumb{display:flex;align-items:center;gap:10px;margin:0 0 18px;font-size:12px;color:var(--muted)}
.project-breadcrumb a{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;margin-left:-8px;border-radius:6px;color:#53624c;text-decoration:none;transition:background .15s,color .15s}
.project-breadcrumb a:hover,.project-breadcrumb a:focus-visible{background:#e6ecdc;color:var(--blue)}.project-breadcrumb .product-icon{width:15px;height:15px;margin:0}.project-breadcrumb>span[aria-hidden]{color:#b0b9a7}
.project-detail-heading{align-items:center;gap:20px;margin-bottom:24px;padding-bottom:22px;border-bottom:1px solid var(--line)}.project-detail-title{min-width:0}.project-detail-heading h1{font-size:26px;line-height:1.4;letter-spacing:-.5px;margin:0;overflow-wrap:anywhere}.project-detail-heading .tags:not(:empty){margin-top:10px}.project-detail-heading .actions{flex-shrink:0}.project-detail-heading .button{font-size:13px}
@media(max-width:850px){.project-detail-heading{flex-wrap:wrap;gap:14px}.project-detail-heading h1{font-size:23px}.project-detail-heading .actions{margin-left:auto}}
@media(max-width:540px){.project-breadcrumb{margin-bottom:12px}.project-detail-heading{padding-bottom:18px;margin-bottom:18px}.project-detail-heading h1{font-size:21px;letter-spacing:0}.project-detail-heading .tag{font-size:11px}.project-detail-heading .actions{width:100%;margin:0}.project-detail-heading .button{width:100%}}

.detail-grid>section,.detail-grid>aside{display:grid;gap:18px;align-content:start}.project-task-history{margin-top:20px}.project-task-history>summary{font-size:13px;color:var(--muted)}

.library-refresh{width:34px;height:34px;padding:8px;color:var(--muted);flex-shrink:0}.library-refresh:hover{background:#e7ecdf}.library-refresh.sync-failed{color:#b86533}.library-refresh[aria-busy=true] .product-icon{animation:library-refresh-spin .8s linear infinite}@keyframes library-refresh-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.library-refresh[aria-busy=true] .product-icon{animation:none}}

.project-actions-menu{position:fixed;inset:auto;margin:0;padding:6px;width:176px;border:1px solid var(--line);border-radius:10px;background:var(--paper);box-shadow:0 8px 28px #1c2a2020;color:var(--ink)}
.project-actions-menu a,.project-actions-menu button{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;padding:10px;border:0;border-radius:6px;background:none;color:inherit;text-decoration:none;font-size:13px;font-weight:500;text-align:left}
.project-actions-menu a:hover,.project-actions-menu button:hover{background:#edf1e7}.project-actions-menu .danger{color:#ad3824}.project-actions-menu .product-icon{width:17px;height:17px}
.delete-project-dialog{width:min(400px,calc(100vw - 32px));box-sizing:border-box;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);box-shadow:0 20px 70px #19221b30}
.delete-project-dialog .error:empty{display:none}.delete-project-dialog::backdrop{background:#18221b55}.delete-project-dialog h2{font-size:20px;margin:0 0 14px}.delete-project-dialog p{font-size:14px;line-height:1.6}.delete-project-name{font-weight:600;overflow-wrap:anywhere}.delete-project-dialog .actions{justify-content:flex-end;margin-top:22px}.delete-project-dialog [data-confirm]{background:#ad3824;color:white;border-color:#ad3824}
