:root{color-scheme:light;--paper:#f6f4ef;--white:#fff;--ink:#18231f;--muted:#65716d;--line:#e0e5df;--green:#176b54;--green-dark:#105440;--mint:#e5f2eb;--peach:#fff0e4;--red:#a63d36;--shadow:0 16px 45px #263d2b12;font-family:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);min-width:0}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit}.topbar{height:76px;padding:0 max(22px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;background:#fbfaf7;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5;padding-top:env(safe-area-inset-top)}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font:700 16px Manrope,sans-serif;line-height:1.2}.brand small{display:block;font:500 11px "DM Sans",sans-serif;color:var(--muted);margin-top:4px;letter-spacing:.04em}.brand-mark{width:40px;height:40px;display:grid;place-items:center;background:var(--green);color:white;border-radius:13px;font:800 19px Manrope}.account{display:flex;align-items:center;gap:12px;min-width:0}.account-state{font-size:13px;color:var(--muted);max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell{max-width:1120px;margin:0 auto;padding:34px 24px 90px}.loading-panel,.notice{background:#fff;border:1px solid var(--line);border-radius:20px;padding:28px;color:var(--muted)}.hero{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin:10px 0 28px}.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:11px;font-weight:700;color:var(--green);margin:0 0 8px}.hero h1,.editor-heading h1{font:800 clamp(28px,5vw,42px)/1.08 Manrope,sans-serif;letter-spacing:-.04em;margin:0}.hero p{max-width:540px;color:var(--muted);line-height:1.55;margin:12px 0 0}.hero-actions{display:flex;gap:9px;flex-wrap:wrap}.button{min-height:46px;border:1px solid var(--line);background:white;color:var(--ink);border-radius:12px;padding:0 17px;font-weight:700;font-size:14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;transition:background .16s,border .16s,transform .16s}.button:active{transform:translateY(1px)}.button:hover{border-color:#a9b7ae}.button-primary{background:var(--green);border-color:var(--green);color:white}.button-primary:hover{background:var(--green-dark);border-color:var(--green-dark)}.button-quiet{background:transparent}.button-danger{color:var(--red)}.button-small{min-height:44px;padding:0 13px;font-size:13px}.button:disabled{opacity:.5;cursor:not-allowed}.full{width:100%}.toolbar{display:grid;grid-template-columns:minmax(180px,1fr) 190px auto;gap:10px;margin-bottom:18px}.field,.select,.text-input{width:100%;height:48px;padding:0 14px;border:1px solid #d9dfd9;border-radius:12px;background:#fff;color:var(--ink);font-size:16px}.field:focus,.select:focus,.text-input:focus,textarea:focus{outline:3px solid #b7ddc9;border-color:var(--green)}.segmented{display:flex;background:#ebece7;padding:4px;border-radius:13px;gap:3px}.segmented button{border:0;background:transparent;border-radius:9px;padding:0 13px;min-height:44px;color:var(--muted);font-size:13px;font-weight:700}.segmented button[aria-pressed="true"]{background:white;color:var(--ink);box-shadow:0 1px 5px #1d322411}.section-title{font:700 17px Manrope,sans-serif;margin:28px 0 13px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.material-card,.template-card{background:var(--white);border:1px solid var(--line);border-radius:17px;padding:18px;box-shadow:0 4px 15px #233c2b08;min-width:0}.card-top{display:flex;justify-content:space-between;gap:10px;align-items:start}.chip{background:var(--mint);color:var(--green-dark);font-size:11px;font-weight:700;padding:6px 9px;border-radius:999px;white-space:nowrap}.chip.physics{background:#e8eefc;color:#384e8a}.material-card h3,.template-card h3{font:700 17px/1.3 Manrope,sans-serif;margin:15px 0 7px;overflow-wrap:anywhere}.material-card p,.template-card p{font-size:13px;line-height:1.55;color:var(--muted);margin:4px 0}.card-meta{color:#8b9690!important;font-size:12px!important}.card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:17px}.card-actions .button{flex:1;min-width:80px}.empty-state{grid-column:1/-1;padding:42px 22px;text-align:center;background:#fff;border:1px dashed #c8d3ca;border-radius:17px}.empty-state h3{font:700 18px Manrope;margin:0 0 7px}.empty-state p{color:var(--muted);margin:0 0 18px;line-height:1.5}.template-card{position:relative;min-height:185px;display:flex;flex-direction:column;align-items:flex-start;cursor:pointer;transition:transform .15s,border .15s}.template-card:hover,.template-card:focus-within{transform:translateY(-2px);border-color:#98b9a3}.template-card .card-icon{width:42px;height:42px;border-radius:13px;background:var(--mint);display:grid;place-items:center;font-size:21px}.template-card.physics .card-icon{background:#e8eefc}.template-card .button{margin-top:auto}.template-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:15px}.template-filters .segmented{width:max-content}.editor{max-width:900px;margin:0 auto}.editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:20px}.editor-heading h1{font-size:clamp(25px,4vw,34px)}.editor-heading .muted{margin:8px 0 0}.save-status{font-size:12px;color:var(--muted);padding-top:7px;white-space:normal;overflow-wrap:anywhere}.save-status.saved{color:var(--green)}.save-status.error{color:var(--red)}.editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:17px}.editor-actions .button{flex:1}.editor-panel{background:white;border:1px solid var(--line);border-radius:18px;margin:13px 0;padding:20px;box-shadow:0 5px 20px #233c2b07}.panel-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}.panel-head h2{font:700 18px Manrope;margin:0}.variant-block{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}.variant-title{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px;margin-bottom:9px;font-size:14px;font-weight:700}.task-card{border:1px solid #e4e9e4;border-radius:14px;padding:14px;margin:10px 0;background:#fcfdfa}.task-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}.task-count{font-size:12px;color:var(--muted);font-weight:700}.task-tools{display:flex;gap:5px}.icon-button{border:1px solid var(--line);background:white;color:var(--muted);width:44px;height:44px;border-radius:11px;font-size:22px;display:grid;place-items:center}.task-tools .icon-button{width:44px;height:44px;font-size:16px}.icon-button:hover{color:var(--ink);border-color:#9caaa0}.task-card label,.label{display:block;font-size:12px;font-weight:700;margin:10px 0 6px;color:#4b5952}.task-card textarea,.text-area{width:100%;min-height:74px;padding:11px 12px;border:1px solid #d9dfd9;border-radius:10px;resize:vertical;line-height:1.45;font-size:16px;color:var(--ink);background:white}.task-card textarea.hint-input{min-height:54px;background:#f8fbf8}.answer-panel{border-color:#e6d7c7;background:#fffaf5}.answer-panel .task-card{background:#fffdf9;border-color:#eee4d9}.answer-label{color:#875127!important}.preview-box{background:#f9faf7;border:1px solid var(--line);border-radius:14px;padding:16px 18px;margin:10px 0}.preview-box h3{font:700 15px Manrope;margin:0 0 10px}.preview-box li{padding:5px 0;line-height:1.5}.preview-box .student-hint{font-size:13px;color:var(--muted)}.private-callout{background:var(--peach);padding:12px 14px;border-radius:11px;color:#77491e;font-size:13px;line-height:1.5}.muted{color:var(--muted);font-size:14px;line-height:1.55}.callout{padding:14px 16px;border-radius:13px;background:#f0f5f0;border:1px solid #dfe9df;font-size:13px;line-height:1.5;color:#52645a}.backup-row{display:flex;gap:9px;flex-wrap:wrap}.inline-status{font-size:12px;color:var(--muted);margin-top:9px}.dialog{border:0;border-radius:20px;padding:0;width:min(460px,calc(100% - 28px));max-height:min(88dvh,720px);overflow:auto;box-shadow:0 24px 80px #13231d44;overscroll-behavior:contain}.dialog::backdrop{background:#17251fb0;backdrop-filter:blur(3px)}.dialog-close{position:sticky;top:0;display:flex;justify-content:flex-end;margin:0;padding:9px 10px 0;z-index:1}.dialog-close .icon-button{border:0;background:transparent}.dialog-body{padding:4px 26px 26px}.dialog-body h2{font:800 25px/1.15 Manrope;letter-spacing:-.03em;margin:0 0 10px}.dialog-body label{display:block;font-size:13px;font-weight:700;margin:20px 0 7px}.dialog-body input{width:100%;height:50px;border:1px solid #d9dfd9;border-radius:12px;padding:0 13px;font-size:16px;margin-bottom:12px}.form-message{color:var(--red);min-height:20px;font-size:13px}.dialog-small{width:min(420px,calc(100% - 28px))}.action-stack{display:grid;gap:8px;margin:20px 0 10px}.text-button{border:0;background:none;color:var(--green);font-weight:700;padding:12px 0}.toast{position:fixed;bottom:calc(18px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#1f3028;color:white;padding:12px 17px;border-radius:12px;box-shadow:var(--shadow);z-index:20;max-width:calc(100vw - 32px);font-size:14px;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.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}.deleting{opacity:.62}@media(max-width:760px){.topbar{height:68px;padding-left:16px;padding-right:16px}.shell{padding:25px 16px 70px}.hero{display:block;margin-top:2px}.hero-actions{margin-top:18px}.toolbar{grid-template-columns:1fr 1fr}.toolbar .field{grid-column:1/-1}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.material-card,.template-card{padding:14px}.card-actions .button{flex:1 1 40%}.editor-actions{display:grid;grid-template-columns:1fr 1fr}.editor-actions .button{min-width:0}.editor-panel{padding:16px}.account-state{display:none}}@media(max-width:440px){.cards{grid-template-columns:1fr}.template-card{min-height:158px}.toolbar{grid-template-columns:1fr}.toolbar .field{grid-column:auto}.hero h1{font-size:31px}.hero-actions .button{flex:1}.editor-heading{display:block}.save-status{display:block;margin-top:7px}.editor-actions{grid-template-columns:1fr 1fr}.dialog-body{padding-left:20px;padding-right:20px}.task-card{padding:11px}.panel-head h2{font-size:16px}.task-tools .icon-button{width:44px;height:44px}}@media(orientation:landscape) and (max-height:500px){.topbar{position:relative}.dialog{max-height:calc(100dvh - 16px)}.shell{padding-top:18px}.editor-panel{padding:12px}}
.secret-row{display:flex;gap:8px;align-items:stretch}.secret-row .text-input{min-width:0;font-family:ui-monospace,monospace;letter-spacing:.04em}.mfa-steps{padding-left:22px;color:var(--muted);font-size:14px;line-height:1.55}.mfa-steps li{padding:4px 0}.recovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0}.recovery-grid code{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f8faf7;font:600 14px/1.3 ui-monospace,monospace;overflow-wrap:anywhere;text-align:center}.editor-panel form .text-input{margin:6px 0 14px}@media(max-width:440px){.secret-row{display:grid;grid-template-columns:1fr}.recovery-grid{grid-template-columns:1fr 1fr}.mfa-steps{font-size:13px}}
.cabinet-nav{margin-left:auto;margin-right:14px}.cabinet-nav .button{color:var(--green-dark);font-weight:700}.cabinet-nav .button:focus-visible,.cabinet-footer a:focus-visible,.auth-legal a:focus-visible{outline:3px solid #b7ddc9;outline-offset:3px}.cabinet-footer{border-top:1px solid var(--line);background:#fbfaf7;padding:24px max(22px,calc((100vw - 1120px)/2)) calc(24px + env(safe-area-inset-bottom));}.cabinet-footer-inner{max-width:1120px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}.cabinet-footer p{margin:5px 0 0;color:var(--muted);font-size:13px}.footer-links{display:flex;gap:16px;flex-wrap:wrap}.cabinet-footer a,.auth-legal a{color:var(--green-dark);text-underline-offset:3px}.footer-links a{font-size:13px}.auth-legal{font-size:12px;line-height:1.5;color:var(--muted);margin:12px 0}.auth-legal a{white-space:nowrap}@media(max-width:760px){.cabinet-footer{padding-left:16px;padding-right:16px}.cabinet-footer-inner{align-items:flex-start;flex-direction:column;gap:12px}.footer-links{gap:10px 16px}.legal-links{padding-top:8px;border-top:1px solid var(--line);width:100%}}
@media(max-width:440px){.topbar{height:auto;min-height:68px;flex-wrap:wrap;gap:4px 8px;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:8px}.brand{gap:7px;font-size:14px}.brand-mark{width:36px;height:36px}.brand small{display:none}.cabinet-nav{order:3;width:100%;margin:0}.cabinet-nav .button{width:100%;padding:0 10px;font-size:13px;min-height:42px}.account{gap:4px}.account .button{padding:0 10px}}

.cabinet-footer{scroll-margin-top:130px}.footer-links a{display:inline-flex;align-items:center;min-height:44px}.auth-legal a{white-space:normal}.cabinet-nav .button{min-height:44px}

.cabinet-footer-inner{flex-wrap:wrap}.cabinet-disclaimer{flex-basis:100%;line-height:1.6}.cabinet-footer a{overflow-wrap:anywhere}

.home-storage-callout{margin-top:18px}.template-select{max-width:240px;margin-bottom:16px}.template-note{margin-top:20px}
