@font-face{font-family:Caveat;font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/caveat-latin-ext-700.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Caveat;font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/caveat-latin-700.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{
  --ink:#24343b;
  --muted:#5d6d73;
  --paper:#faf9f6;
  --surface:#ffffff;
  --surface-soft:#eff5f4;
  --line:#dce6e5;
  --primary:#17677a;
  --primary-hover:#104f61;
  --accent:#16715e;
  --accent-soft:#e2f5ed;
  --accent-line:#a8d8c5;
  --warm-soft:#ffe4d7;
  --focus:#0b768d;
  --danger:#aa3e3a;
  --danger-soft:#fff0ed;
  --danger-line:#edc2b9;
  --warning:#82540d;
  --warning-soft:#fff5d6;
  --warning-line:#ebd490;
  --hero:#193f49;
  --on-hero:#fffaf0;
  --hero-muted:#c7dce0;
  --primary-soft:#e2f1f4;
  --primary-line:#b7d8de;
  --coral:#a94332;
  --coral-soft:#ffe4d7;
  --blue:#316698;
  --blue-soft:#e3f0ff;
  --highlight:#ffe599;
  --hand:'Caveat','Segoe Print','Bradley Hand',cursive;
  --radius:16px;
  --shadow:0 12px 32px #24343b0a;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:15px;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

*{box-sizing:border-box}
body{margin:0}
button,input,textarea,select{font:inherit}
button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:inherit;text-decoration:none}
button{color:inherit}
svg{width:20px;height:20px;flex-shrink:0;vertical-align:middle}
button svg{pointer-events:none}
h1,h2,h3,p{margin:0}
h1,h2,h3{letter-spacing:-.035em;text-wrap:balance}
p{line-height:1.7}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
::selection{background:var(--accent-soft);color:var(--ink)}
.skip-link{position:fixed;left:20px;top:-100px;z-index:50;padding:14px;background:var(--accent-soft)}
.skip-link:focus{top:15px}
.sidebar{width:240px;background:var(--surface);border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;padding:32px 20px 22px;display:flex;flex-direction:column;z-index:15;overflow-y:auto}
.brand{display:flex;gap:11px;align-items:center;font-size:29px;letter-spacing:-1.3px;font-weight:700}
.brand img{width:36px;height:36px;object-fit:contain;flex-shrink:0}
.nav-label{font-size:10px;font-weight:650;letter-spacing:.13em;color:var(--muted);padding:0 12px 14px}
.nav-link{display:flex;align-items:center;gap:12px;border-radius:9px;padding:13px 12px;font-size:13px;font-weight:550;margin-bottom:6px;transition:background .18s,color .18s;min-height:46px}
.nav-link.active{background:var(--primary-soft);color:var(--primary);font-weight:650}
.nav-link.active:after{content:'';width:5px;height:5px;border-radius:50%;background:var(--primary);margin-left:auto}
.nav-link:hover{background:var(--surface-soft)}
.shell{margin-left:240px;min-height:100vh}
.topbar{height:80px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:24px;padding:0 40px;background:var(--paper)}
.searchbar{display:flex;align-items:center;gap:12px;flex:1;max-width:460px;color:var(--muted)}
.searchbar input{width:100%;border:0;background:none;font-size:13px;outline-offset:6px;padding:12px 0;min-width:0;color:var(--ink)}
.account{display:flex;align-items:center;gap:16px}
.language{border:1px solid var(--line);background:var(--surface);border-radius:8px;font-size:12px;font-weight:600;padding:10px}
.avatar{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--accent-soft);font-weight:650;font-size:12px;border:1px solid var(--line)}
.icon-button{display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid var(--line);border-radius:10px;width:36px;height:36px;flex-shrink:0}
.menu-button{display:none}
.main{padding:32px 40px 40px;max-width:1520px;margin:auto;min-height:calc(100vh - 80px)}
.eyebrow{font-size:10px;letter-spacing:.14em;font-weight:650;text-transform:uppercase;display:flex;align-items:center;gap:9px}
.eyebrow:before{content:'';width:6px;height:6px;background:currentColor;border-radius:50%}
.btn{border:1px solid var(--primary);background:var(--primary);color:white;border-radius:9px;padding:12px 18px;font-weight:600;font-size:13px;display:inline-flex;justify-content:center;align-items:center;gap:10px;min-height:44px;transition:transform .18s,background .18s,border-color .18s,box-shadow .18s}
.btn:hover{background:var(--primary-hover);transform:translateY(-1px);box-shadow:0 4px 12px #24343b10}
.btn.secondary{color:var(--primary);background:white;border-color:var(--line)}
.btn.secondary:hover{background:var(--surface-soft)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--primary)}
.btn.lime{background:var(--accent-soft);color:var(--primary);border-color:var(--accent-soft)}
.btn.small{padding:9px 12px;font-size:12px;min-height:38px}
.btn.danger{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-line)}
.section-head{display:flex;gap:20px;justify-content:space-between;align-items:end;margin:40px 0 24px}
.section-head h2{font-size:25px;font-weight:600}
.section-head p{font-size:13px;color:var(--muted);margin-top:10px}
.count{font-size:12px;color:var(--muted);white-space:nowrap}
.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 26px}
.chip{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:10px 14px;font-size:12px;font-weight:500;min-height:40px;transition:background .18s,border-color .18s}
.chip.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.filter-select{margin-left:auto;max-width:185px!important;width:auto!important;font-size:12px!important;min-height:40px!important;padding:9px 12px!important;border-radius:8px!important}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.course-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface);transition:transform .22s,box-shadow .22s,border-color .22s;animation:enter .4s ease both;min-width:0}
.course-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--accent-line)}
.cover{height:180px;position:relative;overflow:hidden;background:var(--accent-soft);display:flex;align-items:center;justify-content:center}
.cover.sage{background:#cef0df}
.cover.peach{background:var(--coral-soft)}
.cover.lavender{background:#f5e6c6}
.cover.blue{background:#d9ebff}
.cover .tag{position:absolute;top:16px;left:16px;font-size:10px;background:#ffffffd9;border:1px solid #ffffff80;padding:6px 9px;border-radius:6px;font-weight:600;z-index:1}
.cover-art{width:180px;height:150px;color:var(--accent)}
.cover.peach .cover-art{color:var(--coral)}
.cover.lavender .cover-art{color:var(--warning)}
.cover.blue .cover-art{color:var(--blue)}
.card-body{padding:22px}
.card-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin-bottom:14px}
.card-meta span{display:flex;align-items:center;gap:5px}
.card-meta svg{width:12px;height:12px}
.course-card h3{font-size:19px;line-height:1.4;font-weight:600;margin-bottom:18px;overflow-wrap:anywhere;text-wrap:pretty}
.author{font-size:12px;display:flex;align-items:center;gap:9px;color:var(--muted)}
.author-initial{width:25px;height:25px;background:var(--surface-soft);border:1px solid var(--line);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:600;color:var(--primary)}
.empty{border:1px dashed var(--accent-line);border-radius:16px;padding:52px 28px;text-align:center;background:var(--surface)}
.empty>svg{width:40px;height:40px;margin-bottom:18px;color:var(--accent)}
.empty h2{font-size:22px}
.empty p{font-size:13px;max-width:480px;margin:14px auto 22px;color:var(--muted)}
.page-heading{margin:14px 0 30px;display:flex;justify-content:space-between;align-items:center;gap:25px}
.page-heading h1{font-size:34px;font-weight:600;max-width:700px;line-height:1.2}
.page-heading p{font-size:13px;color:var(--muted);margin-top:14px;max-width:650px}
.back-link{font-size:13px;display:inline-flex;align-items:center;gap:8px;margin-bottom:24px;color:var(--muted)}
.course-banner{display:grid;grid-template-columns:1.5fr 1fr;gap:40px;align-items:center;border:1px solid var(--line);border-radius:18px;background:var(--surface);padding:40px;margin-bottom:32px}
.course-banner h1{font-size:40px;line-height:1.2;font-weight:550;margin:18px 0 24px}
.course-banner .cover{height:260px;border-radius:14px}
.course-banner .cover-art{width:220px;height:220px}
.detail-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr);gap:35px;align-items:start}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:28px}
.panel h2{font-size:20px;margin-bottom:17px}
.prose{font-size:15px;line-height:1.85;overflow-wrap:anywhere;white-space:pre-wrap}
.prose p{margin-bottom:20px;line-height:1.9}
.muted{color:var(--muted)}
.small-text{font-size:12px;line-height:1.7}
.lesson-row{display:flex;align-items:center;gap:13px;padding:16px 0;border-bottom:1px solid var(--line)}
.lesson-row:last-child{border-bottom:0}
.lesson-number{display:inline-flex;justify-content:center;align-items:center;width:31px;height:31px;border-radius:10px;background:var(--accent-soft);font-size:11px;flex-shrink:0}
.lesson-row strong{display:block;font-size:14px;line-height:1.5;font-weight:550}
.lesson-row small{font-size:12px;color:var(--muted)}
.lesson-row>svg{margin-left:auto;color:var(--muted);width:15px}
.progress-track{width:100%;height:5px;border-radius:9px;overflow:hidden;background:var(--surface-soft);margin:14px 0 8px}
.progress-track progress{appearance:none;-webkit-appearance:none;width:100%;height:5px;border:0;display:block;background:var(--surface-soft)}
.progress-track progress::-webkit-progress-bar{background:var(--surface-soft)}
.progress-track progress::-webkit-progress-value{background:var(--accent);border-radius:9px;transition:width .65s cubic-bezier(.22,1,.36,1)}
.progress-track progress::-moz-progress-bar{background:var(--accent);border-radius:9px}
.progress-label{font-size:10px;display:flex;justify-content:space-between;color:var(--muted)}
.studio-list{display:grid;gap:16px}
.studio-row{display:flex;align-items:center;gap:24px;background:white;border:1px solid var(--line);padding:17px;border-radius:16px}
.studio-row .cover{width:130px;height:100px;border-radius:12px;flex-shrink:0}
.studio-row .cover-art{width:90px;height:90px}
.studio-row .tag{display:none}
.studio-row h2{font-size:18px;margin:8px 0}
.studio-row .btn{margin-left:auto;flex-shrink:0}
.badge{font-size:11px;background:var(--accent-soft);color:var(--accent);padding:5px 9px;border-radius:6px;display:inline-flex;font-weight:550}
.badge.draft{background:var(--warning-soft);color:var(--warning)}
.editor-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}
.editor-top h1{font-size:22px;max-width:500px;overflow-wrap:anywhere}
.editor-top p{font-size:10px;color:var(--muted);margin-top:6px}
.actions{display:flex;gap:10px;align-items:center}
.steps{display:flex;border:1px solid var(--line);border-radius:12px;padding:8px;background:var(--surface);gap:8px;margin-bottom:28px}
.step-button{flex:1;border:0;border-radius:8px;background:transparent;padding:14px;text-align:left;display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;font-weight:600}
.step-button span{width:26px;height:26px;border-radius:50%;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:11px}
.step-button.active{color:var(--primary);background:var(--accent-soft)}
.step-button.active span{background:var(--primary);border-color:var(--primary);color:white}
.form-panel{max-width:800px;margin:auto}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.form-field{display:flex;flex-direction:column;gap:9px;margin-bottom:22px;min-width:0}
.form-field>label,.field-label{font-size:13px;font-weight:600}
.form-field input,.form-field textarea,.form-field select,select.filter-select{border:1px solid #89968e;border-radius:8px;padding:12px 13px;background:var(--surface);color:var(--ink);font-size:14px;min-width:0;width:100%;min-height:44px;transition:border-color .18s,box-shadow .18s}
.form-field textarea{resize:vertical;min-height:130px;line-height:1.7}
.form-field small{font-size:12px;line-height:1.6;color:var(--muted)}
.form-field .content-input{min-height:250px}
.editor-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;align-items:start}
.outline{border:1px solid var(--line);background:white;border-radius:16px;padding:16px;position:sticky;top:20px}
.outline h2{font-size:14px;margin:5px 0 17px}
.outline-item{display:flex;align-items:center;gap:8px;padding:8px;border-radius:10px;margin-bottom:5px;border:1px solid transparent;min-width:0}
.outline-item.active{background:var(--accent-soft);border-color:var(--accent-line)}
.outline-item>button{border:0;background:none;text-align:left;font-size:11px;flex:1;min-width:0;padding:4px;overflow-wrap:anywhere}
.outline-item small{display:block;color:var(--muted);font-size:9px;margin-bottom:4px}
.reorder{display:flex;flex-direction:column;gap:2px}
.reorder button{background:white;border:1px solid var(--line);border-radius:4px;padding:1px 3px;display:flex}
.reorder svg{width:11px;height:11px}
.add-types{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:17px}
.add-types button{font-size:10px;padding:8px 5px;gap:6px;min-height:35px}
.add-types svg{width:14px;height:14px}
.path-setting{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}
.path-setting select{font-size:11px;padding:9px;min-height:35px}
.checkline{display:flex;gap:10px;align-items:center;font-size:12px;line-height:1.6;margin:10px 0}
.checkline input{accent-color:var(--primary);width:17px;height:17px;flex-shrink:0}
.option-editor{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.option-editor input[type=checkbox]{accent-color:var(--primary);width:18px;height:18px;min-height:0;flex-shrink:0}
.option-editor input[type=text]{flex:1}
.option-editor .icon-button{width:30px;height:30px}
.option-editor svg{width:14px;height:14px}
.editor-footer{display:flex;justify-content:space-between;align-items:center;margin:25px 0;gap:12px}
.publish-panel{display:grid;grid-template-columns:1.2fr 1fr;gap:30px}
.publish-panel h2{font-size:30px;margin:10px 0 20px}
.publish-panel p{font-size:13px;color:var(--muted)}
.checklist{list-style:none;padding:18px 0;margin:0}
.checklist li{display:flex;gap:10px;font-size:12px;margin:17px 0;align-items:center}
.checklist svg{width:17px;color:var(--accent)}
.learning-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:30px;align-items:start}
.learning-sidebar{position:sticky;top:24px;max-height:calc(100dvh - 48px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--accent-line) transparent;border:1px solid var(--line);border-radius:14px;padding:22px;background:var(--surface)}
.learning-sidebar h2{font-size:17px;line-height:1.5;margin-bottom:18px}
.learning-sidebar .lesson-nav{margin-top:24px}
.lesson-nav button{width:100%;display:flex;gap:10px;text-align:left;align-items:center;padding:13px 10px;border:1px solid transparent;border-radius:8px;background:transparent;margin:5px 0;font-size:12px;line-height:1.5;transition:background .2s}
.lesson-nav button.active{background:var(--primary-soft);box-shadow:inset 3px 0 var(--primary)}
.lesson-nav button svg{width:17px}
.lesson-nav .done{color:var(--accent)}
.lesson-nav .nav-copy{flex:1;min-width:0;overflow-wrap:anywhere}
.lesson-nav small{font-size:11px;color:var(--muted);display:block;margin-top:4px}
.lesson-stage{min-width:0}
.lesson-stage article{background:var(--surface);border:1px solid var(--line);padding:36px;border-radius:16px;animation:lesson-enter .35s cubic-bezier(.2,.8,.2,1) both}
.lesson-stage h1{font-size:32px;line-height:1.25;margin:18px 0 20px}
.lesson-stage .lesson-kicker{display:flex;gap:15px;align-items:center;font-size:11px;color:var(--muted)}
.lesson-stage .prose{font-size:15px;margin:28px 0}
.lesson-stage .prose p:last-child{margin-bottom:0}
.lesson-stage .form-field{margin-top:22px}
.answer-option{display:flex;align-items:center;gap:14px;background:var(--surface-soft);border:1px solid var(--line);border-radius:11px;padding:17px;margin:10px 0;font-size:13px;cursor:pointer;transition:border-color .2s,transform .2s}
.answer-option:has(input:checked){background:var(--accent-soft);border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}
.answer-option input{width:18px;height:18px;accent-color:var(--primary);flex-shrink:0}
.answer-form .btn{margin-top:20px}
.feedback{border:1px solid var(--accent-line);background:var(--accent-soft);border-radius:13px;padding:21px;margin-top:23px;animation:feedback-in .4s ease both}
.feedback.incorrect{background:var(--warning-soft);border-color:var(--warning-line)}
.feedback strong{display:flex;align-items:center;gap:10px;font-size:14px}
.feedback p{font-size:12px;margin-top:10px}
.feedback .btn{margin-top:15px}
.completion{text-align:center;border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:48px 30px;position:relative;overflow:hidden;animation:lesson-enter .4s ease both}
.completion h1{font-size:34px;margin:15px 0}
.completion p{font-size:13px;max-width:450px;margin:0 auto 24px;color:var(--muted)}
.completion .medal{display:flex;align-items:center;justify-content:center;margin:0 auto 22px;width:85px;height:85px;border-radius:50%;background:var(--accent-soft);border:8px solid var(--accent-line);animation:celebrate .7s ease both}
.medal svg{width:33px;height:33px}
.completion .actions{justify-content:center;flex-wrap:wrap}
.completion:before,.completion:after{content:'✦';position:absolute;font-size:100px;color:var(--accent-line);top:40px;left:20px;animation:spark .8s ease both}
.completion:after{left:auto;right:30px;top:135px;font-size:60px;animation-delay:.1s}
.video-placeholder{aspect-ratio:16/9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:var(--hero);color:var(--on-hero);border-radius:12px;text-align:center;padding:25px;margin:25px 0}
.video-placeholder p{font-size:12px;max-width:340px;color:var(--hero-muted)}
.video-frame{width:100%;aspect-ratio:16/9;border:0;border-radius:14px;background:var(--ink);margin:20px 0}
.bottom-note{font-size:10px;color:var(--muted);text-align:center;margin-top:18px}
.section-enter{animation:enter .35s ease both}
.loading{padding:100px 20px;text-align:center;color:var(--muted);font-size:13px}
.loading:before{content:'';display:block;width:26px;height:26px;border:2px solid var(--line);border-top-color:var(--primary);border-radius:50%;margin:0 auto 20px;animation:slow-spin 1s linear infinite}
dialog{border:1px solid var(--line);padding:0;border-radius:18px;background:var(--surface);color:var(--ink);max-width:min(820px,calc(100vw - 32px));width:820px;max-height:calc(100dvh - 40px);box-shadow:0 24px 80px #24343b2b}
dialog::backdrop{background:#171d2670;backdrop-filter:blur(5px)}
dialog[open]{animation:modal-in .22s ease both}
.dialog-close{position:absolute;top:15px;right:15px;z-index:2;background:#ffffffa8}
.auth-layout{display:grid;grid-template-columns:.9fr 1.1fr}
.auth-brand{background:var(--hero);color:var(--on-hero);padding:40px 32px;display:flex;flex-direction:column;justify-content:space-between;min-height:540px}
.auth-brand h2{font-size:36px;line-height:1.15;font-weight:550;margin-top:45px}
.auth-brand p{font-size:14px;margin-top:20px;line-height:1.75;color:var(--hero-muted)}
.auth-brand .cover-art{width:180px;height:150px;margin:25px auto 0;color:var(--hero-muted)}
.auth-form{padding:45px 35px}
.auth-tabs{display:flex;gap:18px;border-bottom:1px solid var(--line);margin:0 0 25px}
.auth-tabs button{border:0;border-bottom:2px solid transparent;background:none;font-size:13px;font-weight:600;padding:12px 0 16px;color:var(--muted)}
.auth-tabs button.active{border-color:var(--primary);color:var(--primary)}
.auth-form .form-field{margin-bottom:18px}
.auth-form .btn{width:100%;margin-top:8px}
.form-error{font-size:12px;color:var(--danger);line-height:1.7;margin:15px 0}
.preview-content{padding:35px}
.preview-content h2{font-size:30px;margin:15px 30px 20px 0}
.preview-content details{border-top:1px solid var(--line);padding:17px 0}
.preview-content summary{cursor:pointer;font-weight:700;font-size:14px}
.preview-content .prose{margin:20px 0;font-size:13px}
#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:var(--primary);color:white;font-size:12px;border-radius:12px;padding:15px 22px;box-shadow:0 8px 35px #24343b29;z-index:60;max-width:calc(100vw - 30px);display:none}
#toast.visible{display:block;animation:enter .25s ease both}
.inline-error{padding:17px;color:var(--danger);background:var(--danger-soft);border:1px solid var(--danger-line);border-radius:12px;margin-bottom:20px;font-size:12px;line-height:1.6}
.footer{margin-top:46px;border-top:1px solid var(--line);padding-top:20px;font-size:11px;display:flex;justify-content:space-between;gap:16px;color:var(--muted)}
.info-list{display:grid;gap:16px;margin:23px 0}
.info-list div{display:flex;justify-content:space-between;gap:20px;font-size:13px}
.info-list span{color:var(--muted)}
.full-width{width:100%}
.mb{margin-bottom:24px}
.mt{margin-top:24px}
.nowrap{white-space:nowrap}
.hidden{display:none!important}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@keyframes enter{from{opacity:0;transform:translateY(10px)}
to{opacity:1;transform:translateY(0)}
}
@keyframes lesson-enter{from{opacity:0;transform:translateX(16px)}
to{opacity:1;transform:translateX(0)}
}
@keyframes feedback-in{from{opacity:0;transform:translateY(8px) scale(.98)}
to{opacity:1;transform:none}
}
@keyframes modal-in{from{opacity:0;transform:translateY(10px) scale(.98)}
to{opacity:1;transform:none}
}
@keyframes celebrate{0%{transform:scale(.5) rotate(-20deg);opacity:0}
65%{transform:scale(1.12) rotate(5deg)}
100%{transform:scale(1) rotate(0);opacity:1}
}
@keyframes spark{from{transform:scale(0) rotate(-45deg);opacity:0}
to{transform:scale(1) rotate(0);opacity:1}
}

@keyframes slow-spin{to{transform:rotate(360deg)}
}

@media(min-width:1450px){.main{padding-top:45px}
.cards{grid-template-columns:repeat(3,minmax(0,1fr))}
.cover{height:195px}
.cover-art{width:180px;height:170px}
}

@media(max-width:1150px){.sidebar{width:205px;padding:30px 15px 20px}
.shell{margin-left:205px}
.main{padding:30px}
.topbar{padding:0 30px}
.cards{gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}
.editor-layout{grid-template-columns:220px minmax(0,1fr)}
.learning-layout{grid-template-columns:230px minmax(0,1fr)}
.lesson-stage article{padding:26px}
.course-banner{gap:25px}
.course-banner h1{font-size:32px}
}

@media(max-width:900px){.sidebar{width:185px;padding:28px 12px}
.brand{font-size:27px}
.brand img{width:33px;height:33px}
.nav-link{font-size:12px;gap:9px;padding:13px 9px}
.shell{margin-left:185px}
.main{padding:26px}
.topbar{padding:0 26px;height:78px;gap:12px}
.account{gap:10px}
.detail-grid{grid-template-columns:1fr}
.course-banner{padding:30px;grid-template-columns:1fr 150px}
.course-banner .cover{height:200px}
.course-banner .cover-art{width:150px;height:160px}
.editor-layout{grid-template-columns:1fr}
.outline{position:static}
.outline-items{display:flex;overflow:auto;gap:6px}
.outline-item{min-width:170px;max-width:230px}
.add-types{grid-template-columns:repeat(4,1fr)}
.path-setting{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.path-setting .form-field{margin:0}
.learning-layout{grid-template-columns:1fr}
.learning-sidebar{position:static;max-height:none;overflow:visible}
.learning-sidebar h2{margin-bottom:10px}
.learning-sidebar .lesson-nav{display:flex;overflow:auto;gap:7px;margin-top:14px;padding-bottom:5px}
.lesson-nav button{min-width:170px;max-width:230px;border:1px solid var(--line);align-items:start}
.learning-sidebar .progress-track{margin-top:8px}
.publish-panel{grid-template-columns:1fr}
.publish-panel>.course-card{max-width:350px}
.section-head h2{font-size:21px}
.page-heading h1{font-size:30px}
}

@media(max-width:650px){.sidebar{display:none;width:245px;box-shadow:0 0 0 100vw #24343b4d}
.sidebar.open{display:flex}
.shell{margin-left:0}
.menu-button{display:inline-flex;border:0}
.topbar{height:72px;padding:0 17px;gap:12px}
.searchbar{gap:9px}
.searchbar>svg{display:none}
.searchbar input{font-size:12px}
.account .btn{padding:9px 10px;font-size:11px;min-height:40px}
.account{gap:7px}
.language{font-size:10px}
.account .avatar{display:none}
.main{padding:22px 18px 30px}
.eyebrow{font-size:8px}
.section-head{margin-top:30px;gap:12px}
.section-head h2{font-size:21px;line-height:1.3}
.section-head p{font-size:11px}
.count{display:none}
.filters{gap:7px}
.chip{font-size:12px;padding:8px 12px}
.filter-select{margin-left:0}
.cards{gap:18px;grid-template-columns:1fr}
.cover{height:180px}
.cover-art{width:160px;height:150px}
.card-body{padding:20px}
.course-card h3{font-size:19px}
.cover .tag{font-size:10px;padding:5px 8px;left:14px;top:14px}
.card-meta{font-size:12px;flex-wrap:wrap;gap:7px}
.author{font-size:12px}
.author-initial{width:19px;height:19px}
.page-heading{flex-direction:column;align-items:start;margin-top:8px}
.page-heading h1{font-size:29px}
.page-heading p{font-size:12px}
.course-banner{display:block;padding:25px}
.course-banner .cover{display:none}
.course-banner h1{font-size:32px}
.panel{padding:23px}
.detail-grid{gap:23px}
.studio-row{gap:14px;flex-wrap:wrap}
.studio-row .cover{width:75px;height:85px}
.studio-row h2{font-size:15px}
.studio-row .studio-info{flex:1;min-width:150px}
.studio-row .btn{margin:0 0 0 auto}
.editor-top{align-items:start;flex-direction:column}
.editor-top .actions{width:100%;justify-content:space-between}
.steps{gap:3px;padding:6px}
.step-button{font-size:10px;padding:9px 5px;gap:5px}
.step-button span{width:22px;height:22px;font-size:9px;flex-shrink:0}
.form-grid{grid-template-columns:1fr;gap:0}
.form-field{margin-bottom:20px}
.form-field input,.form-field textarea,.form-field select{font-size:16px}
.filter-select{font-size:11px!important}
.path-setting{display:block}
.path-setting .form-field{margin-bottom:10px}
.lesson-stage article{padding:24px 20px}
.lesson-stage h1{font-size:28px}
.lesson-stage .prose{font-size:14px}
.learning-layout{gap:20px}
.learning-sidebar{padding:19px}
.completion{padding:35px 20px}
.completion h1{font-size:28px}
.completion:before,.completion:after{opacity:.35;font-size:50px}
.auth-layout{grid-template-columns:1fr}
.auth-brand{display:none}
.auth-form{padding:38px 25px 25px}
.auth-tabs{margin-top:10px}
.auth-form input{font-size:16px}
.preview-content{padding:25px}
.publish-panel h2{font-size:27px}
.editor-footer .btn{font-size:11px}
.footer{font-size:9px}
.video-placeholder{padding:15px}
.video-placeholder p{font-size:10px}
.empty{padding:38px 20px}
.empty h2{font-size:21px}
}

@media(max-width:380px){.cards{grid-template-columns:1fr}
.cover{height:175px}
.cover-art{width:150px;height:145px}
.course-card h3{font-size:17px}
.card-meta{font-size:10px}
.account .icon-button{width:30px}
.add-types{grid-template-columns:1fr 1fr}
}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

h1,h2,h3{overflow-wrap:anywhere}
.author{min-width:0;overflow-wrap:anywhere}
.sidebar-close{display:none}
@media(max-width:650px){.sidebar-close{display:flex;position:absolute;right:10px;top:8px;width:36px;height:36px;background:#fff}
.sidebar-close svg{width:18px;height:18px}
}

/* Video library, agent connections, and accessible teaching diagrams. */
.media-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;margin:28px 0}
.upload-drop{display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center;border:1.5px dashed var(--accent-line);border-radius:16px;padding:30px 20px;background:var(--surface-soft);margin:20px 0;cursor:pointer}
.upload-symbol{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--accent-soft);color:var(--ink);font-size:32px}
.upload-drop input{max-width:100%;font-size:13px}
.media-explainer ol,.workflow-list{padding-left:22px}
.media-explainer li,.workflow-list li{padding:9px 0;line-height:1.7}
.asset-list{display:grid;gap:12px}
.asset-row{display:flex;align-items:center;gap:20px;padding:22px;background:var(--paper);border:1px solid var(--line);border-radius:14px}
.asset-mark{width:48px;height:48px;flex-shrink:0;display:grid;place-items:center;background:#e1e4e7;border-radius:12px;color:var(--accent)}
.asset-info{flex:1;min-width:0}
.asset-info strong{overflow-wrap:anywhere}
.asset-info code{font-size:10px;overflow-wrap:anywhere;color:var(--muted)}
.asset-info p{margin:5px 0}
.asset-row .badge{white-space:nowrap}
.status-ready{background:var(--accent-soft)}
.status-processing,.status-queued{background:var(--warning-soft)}
.status-failed{background:var(--danger-soft)}
.api-snippet{font-size:12px;line-height:1.7;background:var(--hero);color:var(--on-hero);padding:20px;border-radius:10px;overflow:auto;margin:24px 0}
.secret-box{padding:20px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-soft);margin-top:20px}
.secret-box textarea{font:13px ui-monospace,monospace;min-height:80px;overflow-wrap:anywhere;margin:12px 0;width:100%}
.video-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0;font-size:12px;color:var(--muted)}
.video-controls select{width:auto;max-width:180px}
.video-controls span{margin-left:auto}
#upload-state progress{width:100%;height:10px;accent-color:var(--ink)}
#key-form fieldset{border:0;padding:0}
#key-form legend{font-size:13px;font-weight:600;margin-bottom:8px}
.motion-panel{margin:30px 0;padding:24px;border:1px solid var(--primary-line);border-radius:14px;background:var(--primary-soft);overflow:hidden}
.motion-panel h2{font-size:18px;margin:0}
.motion-panel .section-head{gap:16px;flex-wrap:wrap}
.motion-steps{list-style:none;display:grid;gap:10px;padding:0;margin:20px 0 0}
.motion-step{display:flex;align-items:center;gap:16px;padding:16px;border-radius:10px;border:1px solid var(--line);background:var(--surface)}
.motion-number{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600}
.motion-step strong{font-size:14px}
.motion-step p{font-size:13px;line-height:1.5;color:var(--muted);margin:5px 0 0}
.motion-playing .motion-step{animation:teaching-step 3s ease-in-out 1 both}
.motion-playing .motion-1{animation-delay:3s}
.motion-playing .motion-2{animation-delay:6s}
.motion-playing .motion-3{animation-delay:9s}
.motion-playing .motion-4{animation-delay:12s}
.motion-playing .motion-5{animation-delay:15s}
.motion-playing .motion-6{animation-delay:18s}
.motion-paused .motion-step{animation-play-state:paused}
@keyframes teaching-step{0%,100%{transform:translateX(0);border-color:transparent;background:var(--paper)}
20%,80%{transform:translateX(5px);border-color:var(--accent-line);background:var(--accent-soft)}
}
.motion-panel .btn{font-size:11px}

@media(max-width:900px){.media-layout{grid-template-columns:1fr}
.asset-row{flex-wrap:wrap;gap:12px}
.asset-info{flex-basis:calc(100% - 70px)}
.asset-row .actions{margin-left:auto}
}
@media(max-width:500px){.asset-row{padding:16px}
.motion-panel{padding:16px}
.motion-step{padding:12px;gap:10px}
.video-controls span{margin-left:0}
.motion-panel .actions{flex-wrap:wrap}
}

@media(prefers-reduced-motion:reduce){.motion-playing .motion-step{animation:none!important;transform:none!important}
.motion-panel [data-action^="motion-"]{display:none}
}

.learning-sidebar,.media-layout>*{min-width:0}
.video-frame{max-width:100%}
.motion-step>div{min-width:0;overflow-wrap:anywhere}

#video-retry[hidden]{display:none}

.course-share{margin-top:12px}
.studio-actions{flex-wrap:wrap;justify-content:flex-end}
.learning-sidebar>[data-action="share-course"]{margin:12px 0 4px}
#share-dialog{width:560px}
.share-content{padding:36px}
.share-content h2{font-size:30px;line-height:1.2;margin:12px 24px 24px 0}
.shared-course-title{font-size:18px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.share-intro{font-size:13px;color:var(--muted);margin:12px 0 24px}
.share-actions{display:flex;flex-wrap:wrap;gap:10px}
.share-actions .btn{flex:1}
#share-status{margin-top:16px;color:var(--primary);line-height:1.6}
#share-url{width:100%;min-width:0;font-size:14px}
@media(max-width:500px){.share-content{padding:28px 22px}
.share-content h2{font-size:25px}
.share-actions{flex-direction:column}
.studio-actions{width:100%}
.studio-row .studio-actions .btn{margin:0}
}

/* Brand accents and the three learning formats in the welcome panel. */

.video-placeholder .btn:hover{background:#e2f5ed;border-color:#e2f5ed}

.video-placeholder .btn:focus-visible{outline-color:var(--on-hero)}

.course-card>a{display:flex;flex-direction:column;height:100%}

.course-card>a:focus-visible{outline-offset:-4px;border-radius:14px}

.card-body{display:flex;flex-direction:column;flex:1}

.card-body .author{margin-bottom:20px}

.card-body .progress-label{margin-bottom:18px}

.chip:hover{border-color:var(--accent-line)}

.form-field input:hover,.form-field textarea:hover,.form-field select:hover{border-color:var(--accent)}


.lesson-nav button:disabled{opacity:.72}

.step-button:not(.active):hover{background:var(--paper)}

.video-placeholder .btn{background:var(--on-hero);color:var(--hero);border-color:var(--on-hero)}

.auth-brand .brand img{width:42px;height:42px}

.icon-button:hover{background:var(--surface-soft)}

input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}

@media(max-width:650px){
.section-head h2{font-size:23px}
.section-head p{font-size:13px}
.eyebrow{font-size:9px}
.language{padding:8px;min-height:40px}
.lesson-stage .prose{font-size:15px}
.video-placeholder p{font-size:12px}
.footer{font-size:10px;flex-wrap:wrap}
}


/* Mobile navigation keeps search on its own full-width row. */
@media(max-width:650px){
 .topbar{height:auto;min-height:120px;padding:14px 18px;display:grid;grid-template-columns:32px 1fr auto;gap:12px 10px}
 .menu-button{grid-column:1;grid-row:1;width:32px;height:40px}
 .account{grid-column:3;grid-row:1}
 .account .btn>svg{display:none}
 .searchbar{grid-row:2;grid-column:1/-1;max-width:none;width:100%;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:9px 12px;gap:10px}
 .searchbar>svg{display:block;width:17px;height:17px}
 .searchbar input{font-size:16px;padding:2px 0}
 .main{min-height:calc(100vh - 120px)}
}
