:root{--bg:#f4f4f2;--card:#ffffff;--text:#141414;--muted:#6b6b6b;--line:#e6e6e3;--accent:#141414;--accent-text:#ffffff;--ok:#1f8a4c;--soft:#f0f0ed;--radius:12px}*{box-sizing:border-box}body,html{margin:0}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}h1{font-size:1.6rem;line-height:1.2;margin:0 0 .3rem}h2{font-size:1.15rem;margin:0 0 1rem}img{display:block}.wrap{max-width:1100px;margin:0 auto;padding:0 16px}.muted{color:var(--muted)}.small{font-size:.85rem}.error{color:#b42318;background:#fef3f2;padding:.6rem .8rem}.error,.notice{border-radius:8px}.notice{background:#ecfdf3;color:#05603a;padding:.7rem 1rem}.topbar{background:var(--card);border-bottom:1px solid var(--line);margin-bottom:24px}.topbar-inner{justify-content:space-between;height:60px}.brand,.topbar-inner{display:flex;align-items:center}.brand{gap:.55rem;font-weight:600}.brand-mark{background:var(--accent);color:var(--accent-text);padding:.2rem .45rem;border-radius:6px;font-size:.8rem;letter-spacing:.05em}.topnav{display:flex;align-items:center;gap:1.1rem;font-size:.9rem}.topnav form{margin:0}.topbar-inner{height:68px}.brand{gap:.8rem}.brand-logo{height:38px;width:auto;display:block}.brand-logo-sm{display:none;height:30px;width:auto}.brand-name{font-weight:500;color:var(--muted);padding-left:.8rem;border-left:1px solid var(--line);line-height:1.4}.nav-edit{color:var(--accent-text)!important}.show-xs{display:none}@media (max-width:480px){.show-xs{display:inline}}.login-logo{width:200px;height:auto;align-self:center;margin-bottom:.4rem}@media (max-width:720px){.brand-logo{display:none}.brand-logo-sm{display:block}.nav-edit{padding:.4rem .6rem}.topnav{gap:.8rem;font-size:.85rem}}@media (max-width:480px){.brand-name,.hide-xs{display:none}.brand-logo-sm{height:26px}.topnav{gap:.6rem}}.footer{padding:40px 16px;font-size:.8rem}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;background:var(--accent);color:var(--accent-text);border:1px solid var(--accent);padding:.65rem 1.1rem;border-radius:8px;font:inherit;font-weight:500;cursor:pointer;white-space:nowrap}.btn:hover{opacity:.88}.btn:disabled{opacity:.5;cursor:default}.btn-ghost{background:transparent;color:var(--text);border-color:var(--line)}.btn-ghost:hover{background:var(--soft);opacity:1}.btn-sm{padding:.4rem .7rem;font-size:.85rem}.link-btn{background:none;border:0;padding:0;font:inherit;color:var(--muted);cursor:pointer}.link-btn:hover{color:var(--text);text-decoration:underline}.badge{display:inline-block;font-size:.72rem;background:var(--soft);color:var(--muted);padding:.1rem .45rem;border-radius:999px;margin-left:.4rem}.badge:first-child{margin-left:0}.progress{height:6px;background:var(--soft);border-radius:999px;overflow:hidden;margin-top:.5rem;max-width:360px}.progress-fill{height:100%;background:var(--ok);border-radius:999px;transition:width .3s}.check{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--line);display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;color:#fff}.check-done{background:var(--ok);border-color:var(--ok)}.crumbs{margin-bottom:12px}.crumbs a:hover{text-decoration:underline}.hero{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;padding:28px;margin-bottom:16px}.hero>div{flex:1 1}.resume{margin:-4px 0 16px 4px}.list{overflow:hidden}.row{display:flex;align-items:center;gap:1rem;padding:14px 18px;border-bottom:1px solid var(--line)}.row:last-child{border-bottom:0}a.row:hover{background:#fafaf8}.row-body{flex:1 1;min-width:0}.row-title{font-weight:600}.row-locked{opacity:.55;cursor:not-allowed}.thumb{width:128px;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:var(--soft);flex:none}.thumb-wrap{position:relative;flex:none}.thumb-placeholder{display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:1.3rem;border:1px solid var(--line)}.task-banner{gap:.8rem;padding:28px 22px;background:var(--soft);border-bottom:1px solid var(--line)}.task-banner,.task-icon{display:flex;align-items:center}.task-icon{flex:none;width:36px;height:36px;border-radius:50%;background:var(--card);border:1px solid var(--line);justify-content:center}.duration{position:absolute;right:6px;bottom:6px;background:rgba(0,0,0,.75);color:#fff;font-size:.72rem;padding:0 .35rem;border-radius:4px}.pager{display:flex;justify-content:space-between;gap:1rem;margin-top:16px}.lesson-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-gap:16px;gap:16px;align-items:start}.player{overflow:hidden}.player video{width:100%;aspect-ratio:16/9;background:#000;display:block}.player-bar{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:12px 16px}.done-label{color:var(--ok);font-weight:600}.skip-warning{flex:1 1;display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;background:#fffaeb;color:#93370d;border:1px solid #fedf89;border-radius:8px;padding:.6rem .8rem;font-size:.9rem}.code-form{display:flex;flex-direction:column;gap:.4rem;flex:1 1;max-width:460px}.code-row{display:flex;gap:.5rem}.code-row input{flex:1 1;min-width:0;font-weight:400}.code-form .error{padding:.35rem .6rem}.lesson-info{margin-top:16px;padding:22px 24px}.description{white-space:pre-line;margin:.6rem 0 0}.description a{color:#1a56db;text-decoration:underline}.sidebar{position:-webkit-sticky;position:sticky;top:16px;overflow:hidden}.sidebar-head{padding:14px 16px;flex-direction:column}.side-row,.sidebar-head{border-bottom:1px solid var(--line);display:flex}.side-row{align-items:center;gap:.7rem;padding:10px 16px;font-size:.9rem}.side-row:last-child{border-bottom:0}a.side-row:hover{background:#fafaf8}.side-row.active{background:var(--soft);font-weight:600}.side-title{flex:1 1;min-width:0}.login{display:flex;justify-content:center;padding:40px 0}.login-card{width:100%;max-width:400px;padding:32px;display:flex;flex-direction:column;gap:1rem}.login-card p{margin:0}label{display:flex;flex-direction:column;gap:.35rem;font-size:.85rem;font-weight:500}input:not([type]),input[type=email],input[type=password],input[type=text]{font:inherit;padding:.6rem .75rem;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text)}input:focus{outline:2px solid var(--accent);outline-offset:-1px}.table-card{overflow-x:auto;margin:16px 0}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:12px 16px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:600}tr:last-child td{border-bottom:0}tr.inactive{opacity:.5}.progress-cell{min-width:140px}.actions summary{cursor:pointer;color:var(--muted);font-size:.85rem}.actions[open]{display:flex;flex-direction:column;gap:.5rem;min-width:220px}.actions form{margin:0}.inline-form{display:flex;gap:.4rem;margin-top:.5rem!important}.inline-form input{flex:1 1;min-width:0;padding:.4rem .6rem}.add-user{padding:24px}.grid-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));grid-gap:1rem;gap:1rem;align-items:end}.checkbox{flex-direction:row;align-items:center;gap:.5rem;padding-bottom:.7rem}@media (max-width:860px){.lesson-grid{grid-template-columns:1fr}.sidebar{position:static}}@media (max-width:600px){.hero{flex-direction:column;align-items:stretch;padding:20px}.thumb{width:88px}.row{padding:12px 14px;gap:.75rem}.hide-sm{display:none}h1{font-size:1.35rem}.lesson-info{padding:18px}}.link{color:#1a56db}.link-plain:hover,.link:hover{text-decoration:underline}.empty{padding:16px 18px;margin:0}.badge-draft{background:#fef0c7;color:#93370d}.badge-live{background:#dcfae6;color:#067647}h1 .badge{vertical-align:middle}.settings{padding:0;margin-bottom:16px}.chapter-edit>summary,.settings>summary{cursor:pointer;padding:14px 18px;font-weight:500}.chapter-edit>summary{padding:8px 18px;font-size:.85rem;color:var(--muted);font-weight:400}.settings-form{display:flex;flex-direction:column;gap:.9rem;padding:0 18px 18px;max-width:560px}.edit-form select,.edit-form textarea,.settings-form select,.settings-form textarea{font:inherit;padding:.6rem .75rem;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);resize:vertical}.form-row{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}.editor-chapter{margin-bottom:16px;overflow:hidden}.editor-head{justify-content:space-between;gap:1rem;padding:14px 18px;border-bottom:1px solid var(--line)}.editor-head,.editor-title{display:flex;align-items:center;flex-wrap:wrap}.editor-title{gap:.55rem}.editor-title .badge{margin-left:0}.editor-actions{display:flex;align-items:center;gap:.3rem}.editor-actions form{margin:0}.icon-btn{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 .4rem;border:1px solid var(--line);background:var(--card);border-radius:8px;cursor:pointer;font:inherit;font-size:.85rem;color:var(--text)}.icon-btn:hover:not(:disabled){background:var(--soft)}.icon-btn:disabled{opacity:.35;cursor:default}.icon-btn.is-live{color:var(--ok)}.icon-btn.danger:hover,.link-btn.danger{color:#b42318}.editor-lessons{border-top:1px solid var(--line)}.editor-row{display:flex;align-items:center;gap:.9rem;padding:10px 18px;border-bottom:1px solid var(--line)}.editor-row .thumb{width:88px}.badges{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin-top:.2rem}.badges .badge{margin-left:0}.add-row{display:flex;gap:.5rem;padding:12px 18px}.add-chapter input,.add-row input{flex:1 1;min-width:0}.add-chapter{display:flex;gap:.6rem;padding:16px 18px}.danger-zone{padding:4px 18px 14px;margin:0}.edit-form{margin-top:16px;padding:22px 24px;display:flex;flex-direction:column;gap:1rem}.edit-form h1{font-size:1.25rem}.edit-form fieldset{border:1px solid var(--line);border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:.6rem;margin:0}.edit-form legend{font-size:.85rem;font-weight:600;padding:0 .3rem}.edit-form .checkbox{padding-bottom:0;font-weight:400}.indent{margin-left:1.6rem;max-width:260px}.upload-card{margin-top:16px;padding:16px 18px;display:flex;flex-direction:column;gap:.7rem}.upload-buttons{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.upload-buttons label.btn{flex-direction:row;font-size:inherit}.btn-disabled{opacity:.5;pointer-events:none}.upload-progress .progress{max-width:none}.upload-card .error,.upload-card .notice{margin:0}@media (max-width:600px){.editor-row{flex-wrap:wrap}.editor-row .editor-actions{width:100%;justify-content:flex-end}.add-chapter,.add-row{flex-direction:column}}.editor-toolbar{justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:0 4px 10px}.editor-toolbar,.expand-all{display:flex;align-items:center}.expand-all{gap:.4rem}.editor-chapter .editor-head{border-bottom:0}.editor-chapter.is-open .editor-head{border-bottom:1px solid var(--line)}.editor-toggle{flex:1 1;min-width:0;display:flex;align-items:center;gap:.6rem;text-align:left;background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}.editor-toggle:hover strong{text-decoration:underline}.chevron{flex:none;color:var(--muted);transition:transform .15s}.is-open .chevron{transform:rotate(90deg)}.chapter-edit{background:#fafaf8;border-bottom:1px solid var(--line);padding-top:14px}.editor-lessons{border-top:0}.editor-row-main{flex:1 1;min-width:0;display:flex;align-items:center;gap:.9rem}.editor-row-main:hover .row-title{text-decoration:underline}.status-btn{font-size:.75rem;font-weight:600;min-width:64px}.status-btn.is-live{color:var(--ok);border-color:#abefc6;background:#f6fef9}.status-btn.is-draft{color:#93370d;border-color:#fedf89;background:#fffcf5}@media (max-width:600px){.editor-head{align-items:flex-start}.editor-actions{flex-wrap:wrap}}