@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');
:root{--ink:#1b2c35;--muted:#68767b;--line:#dce2e3;--paper:#fff;--bg:#f6f8f8;--accent:#b84223;--accent-light:#fff0e9;--blue:#246077;--ne:'Noto Sans Devanagari',sans-serif}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font-family:'DM Sans',system-ui,sans-serif;font-size:16px;line-height:1.5}button,select,input{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button{color:inherit}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible{outline:3px solid #2f83ab;outline-offset:4px}button{transition:background .16s,transform .16s}button:active{transform:translateY(1px)}[lang=ne]{font-family:var(--ne)}.topbar{height:100px;padding:0 4%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:white}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--ink);font-size:29px;font-weight:700;letter-spacing:-1px;line-height:1.2}.brandmark{display:grid;place-items:center;width:48px;height:53px;background:var(--accent);border-radius:13px 13px 13px 3px;color:white;font-size:37px;padding-top:8px}.brand-sub{display:block;font-size:10px;letter-spacing:2px;font-weight:600;margin-top:5px}.header-right{display:flex;gap:20px;align-items:center}.header-right [lang=ne]{font-size:25px}.small{font-size:14px;color:var(--muted)}.app-shell{max-width:1550px;margin:auto;display:grid;grid-template-columns:256px minmax(0,1fr)}.library{padding:30px 23px;border-right:1px solid var(--line);min-height:calc(100vh - 100px);background:#fff}.eyebrow{font-size:12px;font-weight:700;letter-spacing:1.8px;color:var(--muted)}.library-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.library-heading .small{font-size:12px}.lesson-tabs{display:flex;background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:4px;gap:4px}.lesson-tabs button{flex:1;background:none;border:0;border-radius:5px;padding:8px 4px;font-size:14px}.lesson-tabs button[aria-selected=true]{background:var(--ink);color:#fff;font-weight:600}.library h3{font-size:14px;margin:24px 0 12px;font-weight:600}.library h3 span{font-size:13px;color:var(--muted);font-weight:400;display:block}.letter-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.letter-tile{position:relative;min-width:0;min-height:65px;border:1px solid var(--line);border-radius:8px;background:white;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 0 3px}.letter-tile>span{font-size:25px;line-height:1.35}.letter-tile small{font-size:12px;color:var(--muted)}.letter-tile:hover{border-color:var(--accent)}.letter-tile.selected{background:var(--accent-light);border-color:var(--accent);color:var(--accent)}.letter-tile.selected small{color:var(--accent)}.library-note{display:flex;gap:10px;font-size:13px;color:var(--muted);line-height:1.7;margin-top:30px;border-top:1px solid var(--line);padding-top:20px}.library-note p{margin:0}.note-symbol{font-size:24px;color:var(--accent)}main{padding:31px 40px 30px;min-width:0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}h1{font-size:32px;letter-spacing:-1px;font-weight:500;margin:5px 0 0;line-height:1.25}.text-button{background:none;border:0;color:var(--muted);font-size:14px;white-space:nowrap}.text-button span{margin-left:8px}.lesson-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--accent-light);border:1px solid #eed7cb;border-radius:12px;padding:18px 25px}.letter-identity{display:flex;align-items:center;gap:23px;min-width:0}.banner-glyph{font-size:52px;min-width:52px;color:var(--accent);line-height:1.5;padding-top:7px}.letter-identity h2{font-size:22px;margin:0;font-weight:600}.letter-identity h2 span{font-size:14px;color:var(--muted);font-weight:400;margin-left:8px}.letter-identity p{margin:3px 0 0;color:#626969;font-size:14px}.listen-button{display:flex;align-items:center;gap:9px;border:1px solid #d9bdae;background:white;border-radius:7px;padding:10px 15px;color:var(--accent);font-size:14px;font-weight:600;white-space:nowrap}.listen-button svg{width:19px;height:19px}.audio-status{font-size:13px;min-height:8px;margin:2px 0 12px;color:var(--muted)}.audio-status:empty{height:6px;margin:0}.practice-columns{display:grid;grid-template-columns:1fr 1fr;gap:21px}.practice-card{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}.card-heading{display:flex;align-items:center;justify-content:space-between;padding:19px 20px 12px;gap:10px}.card-heading h2{font-size:16px;font-weight:600;margin:0;display:flex;align-items:center;gap:10px;white-space:nowrap}.step-number{font-size:12px;font-weight:600;color:var(--accent);background:var(--accent-light);padding:3px 6px;border-radius:4px}.pill{font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:3px 8px;white-space:nowrap}.diagram-area,.drawing-area{position:relative;margin:8px 20px 0;height:290px;border:1px solid #e4e9eb;border-radius:8px;overflow:hidden;background-color:#fcfdfd;background-image:linear-gradient(#d7e2e740 1px,transparent 1px),linear-gradient(90deg,#d7e2e740 1px,transparent 1px);background-size:28px 28px;display:grid;place-items:center}.diagram-area:after,.drawing-area:after{content:'';position:absolute;top:27%;left:0;right:0;border-top:1px dashed #b7cbd5;pointer-events:none}.large-glyph{font-size:190px;line-height:1.5;padding-top:36px}.watch-controls,.pad-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:18px 20px 6px}.primary-button,.dark-button,.outline-button{border:0;border-radius:7px;font-size:14px;font-weight:500;padding:11px 16px;white-space:nowrap;background:var(--accent);color:white}.primary-button:hover{background:#98351c}.primary-button>span{font-size:12px;margin-right:6px}.dark-button{background:var(--ink)}.outline-button{background:white;color:var(--ink);border:1px solid var(--line)}.icon-text-button{background:none;border:0;padding:8px;font-size:14px;white-space:nowrap}.speed-label select{border:0;background:none;font-size:12px;color:var(--muted);max-width:89px}.card-caption{padding:0 20px;font-size:13px;color:var(--muted);min-height:22px;margin:9px 0 16px}.guide-toggle{display:flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap}.guide-toggle input{accent-color:var(--blue);width:15px;height:15px}.trace-guide{font-size:190px;position:absolute;line-height:1.5;padding-top:36px;color:#dbe3e6;pointer-events:none;user-select:none}.drawing-area canvas{position:absolute;width:100%;height:100%;touch-action:none;z-index:2}.draw-prompt{position:absolute;bottom:14px;font-size:12px;color:#77878d;pointer-events:none}.word-example{margin-top:22px;padding:21px 26px;display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:10px;background:#fff}.word-example h2{margin:10px 0 0;font-size:27px;font-weight:500;line-height:1.4}.word-roman{font-size:17px;color:var(--muted);margin-left:14px}.word-example p{font-size:14px;margin:2px 0 0;color:var(--muted)}.lesson-bottom{display:flex;justify-content:space-between;align-items:center;margin:22px 0}.lesson-bottom>div{display:flex;gap:12px}.learning-notes{border-top:1px solid var(--line);padding-top:16px;font-size:14px;color:var(--muted)}.learning-notes summary{cursor:pointer}.learning-notes p{max-width:80ch}.learning-notes a{color:var(--blue)}dialog{border:1px solid var(--line);border-radius:16px;padding:35px;max-width:520px;width:calc(100% - 30px);color:var(--ink);line-height:1.7}dialog::backdrop{background:#152d4560;backdrop-filter:blur(3px)}dialog h2{font-size:28px;font-weight:500;margin:8px 0 20px}dialog ol{padding-left:22px}dialog li{margin:15px 0}dialog p{font-size:14px;color:var(--muted)}.close-dialog{position:absolute;right:15px;top:8px;border:0;background:none;font-size:30px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1450px){main{padding-left:55px;padding-right:55px}.diagram-area,.drawing-area{height:330px}}@media(max-width:1100px){.app-shell{grid-template-columns:214px minmax(0,1fr)}.library{padding:25px 16px}main{padding:28px 24px}.card-heading{padding:17px 14px 8px}.card-heading h2{font-size:14px;gap:6px}.diagram-area,.drawing-area{margin:8px 13px 0;height:255px}.watch-controls,.pad-controls{padding:14px 12px 5px;flex-wrap:wrap}.card-caption{padding:0 14px}.pill{font-size:11px}.primary-button,.dark-button{padding:10px 12px}.guide-toggle span{font-size:11px}}@media(max-width:800px){.topbar{height:80px;padding:0 22px}.header-right .small{display:none}.app-shell{display:block}.library{min-height:0;border-right:0;border-bottom:1px solid var(--line);padding:16px 22px}.library-heading,.library-note{display:none}.lesson-tabs{max-width:240px}.library h3{margin:12px 0 7px}.library h3 span{display:inline;margin-left:9px}.letter-grid{display:flex;overflow-x:auto;padding-bottom:5px}.letter-tile{min-width:49px}.letter-grid-wrap{display:inline}.library-group:not(:first-child){margin-top:6px}.library-content{overflow:hidden}.page-heading{margin-bottom:20px}h1{font-size:27px}main{padding:25px 22px}.practice-columns{gap:15px}.diagram-area,.drawing-area{height:250px}.large-glyph,.trace-guide{font-size:175px}}@media(max-width:580px){.topbar{height:75px}.brand{font-size:25px}.brandmark{width:39px;height:45px;font-size:32px}.brand-sub{font-size:8px}.header-right [lang=ne]{font-size:22px}.library{padding:14px 16px}.library-group h3 span{display:none}.page-heading{align-items:flex-start}.text-button{font-size:12px;padding:4px 0}h1{font-size:25px}.eyebrow{font-size:11px}main{padding:23px 16px}.lesson-banner{padding:15px;gap:8px}.letter-identity{gap:13px}.banner-glyph{font-size:43px;min-width:40px}.letter-identity h2{font-size:20px}.letter-identity h2 span{display:block;margin:0;font-size:12px}.letter-identity p{font-size:12px}.listen-button{padding:9px;font-size:12px}.practice-columns{grid-template-columns:1fr}.card-heading{padding:17px 18px 12px}.card-heading h2{font-size:16px}.diagram-area,.drawing-area{height:275px;margin:4px 18px 0}.watch-controls,.pad-controls{padding:17px 18px 5px}.card-caption{padding:0 18px}.word-example{padding:18px;gap:14px;align-items:flex-start}.word-example h2{font-size:24px}.word-roman{display:block;margin:5px 0 0;font-size:15px}.word-example .outline-button{font-size:12px;padding:9px}.lesson-bottom{align-items:flex-start;gap:10px}.lesson-bottom>div{gap:3px}.lesson-bottom .small{font-size:12px;max-width:90px}.lesson-bottom .primary-button,.lesson-bottom .icon-text-button{font-size:12px}.guide-toggle span{font-size:12px}}
