:root{--ink:#302a40;--muted:#71677c;--purple:#7052ac;--lavender:#ede5f5;--mint:#dfede3;--paper:#faf8f3;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:var(--purple)}button{border:1px solid #dcd3e3;border-radius:8px;padding:.65rem .85rem;color:var(--ink);background:#fff;min-height:42px}a.button{display:inline-flex;align-items:center;text-decoration:none}.button{background:var(--purple);color:white;border:0;border-radius:9px;padding:.9rem 1.2rem;font-weight:650}.link{background:none;border:0;padding:.25rem;min-height:36px;color:var(--purple);text-decoration:underline;text-underline-offset:3px}header{max-width:1200px;margin:auto;display:flex;justify-content:space-between;align-items:center;padding:1.4rem 2rem}.brand{display:flex;align-items:center;gap:.65rem;text-decoration:none;font-weight:800;letter-spacing:-.065em;font-size:2.2rem;color:var(--ink)}nav{display:flex;align-items:center;gap:1rem}header nav a{text-decoration:none;font-size:.9rem}main{max-width:1100px;margin:auto;padding:1rem 2rem 2.5rem}.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:6rem;align-items:center}.eyebrow{font-size:.68rem;letter-spacing:.13em;text-transform:uppercase;font-weight:750;color:#77618e;margin:0 0 1rem}h1{font-size:clamp(2.8rem,6vw,5rem);line-height:1.02;letter-spacing:-.055em;margin:0 0 1.6rem;font-weight:780}h1 em{font-style:normal;color:#7956a3;text-decoration:underline;text-decoration-color:#adcab7;text-decoration-thickness:5px;text-underline-offset:10px}.lead{font-size:1.1rem;line-height:1.75;color:#6a5e76;max-width:460px;margin:0 0 1.5rem}h2{font-size:1.6rem;letter-spacing:-.03em;line-height:1.2;margin-top:0}p{line-height:1.65}.access{background:#fff;border:1px solid #e4dce8;border-radius:15px;padding:2rem}.access .caption{margin-bottom:0}.tabs{display:flex;gap:3px;background:#f2edf7;padding:4px;border-radius:11px;margin:1.2rem 0}.tabs button{flex:1;background:none;border:0;color:#756583;font-size:.9rem}.tabs .active{background:#fff;color:#62448b}label{display:grid;gap:.45rem;margin:.9rem 0;font-size:.9rem;font-weight:550}input:not([type=checkbox]),textarea,select{width:100%;border:1px solid #d9d0e0;border-radius:7px;padding:.75rem;background:#fefdfb;color:var(--ink)}textarea{resize:vertical;line-height:1.5}input[type=checkbox]{accent-color:var(--purple);width:18px;height:18px;flex-shrink:0}label small{font-weight:400;color:var(--muted)}form>.button{width:100%;margin-top:.5rem}.consent{display:flex;align-items:flex-start;line-height:1.6;font-size:.8rem}.small-links{display:grid;margin-top:.65rem;justify-items:start}.small-links .link{font-size:.8rem}.caption{color:#81728a;font-size:.76rem;text-align:center}.status{font-size:.85rem;color:#774460;white-space:pre-wrap}.status:empty{display:none}.demo-card{display:block;width:285px;height:215px;position:relative;perspective:1000px;border:0;background:none;padding:0;margin:2.6rem auto 1.8rem;isolation:isolate}.demo-card::before{content:"";position:absolute;inset:8px -8px -8px 8px;border:1px solid #c6d9cc;border-radius:7px;transform:rotate(6deg);background:#dceade;z-index:-1}.demo-inner{display:block;position:relative;height:100%;transform:rotate(-4deg);transform-style:preserve-3d;transition:transform .6s ease}.demo-card[aria-pressed=true] .demo-inner{transform:rotate(-4deg) rotateY(180deg)}.face{display:flex;position:absolute;inset:0;flex-direction:column;justify-content:space-between;align-items:center;padding:1.5rem;background:#efe8f6;border:1px solid #d9cfe3;border-radius:7px;box-shadow:0 10px 16px #59426915;backface-visibility:hidden;-webkit-backface-visibility:hidden}.face small{font-size:.6rem;letter-spacing:.15em;border-bottom:1px solid #cebfdb;padding-bottom:.65rem;width:100%}.face strong{font-size:1.6rem;line-height:1.2;letter-spacing:-.03em}.face>span{font-size:.7rem;color:#786482}.face.back{background:#e3efe5;transform:rotateY(180deg)}footer{max-width:1200px;margin:auto;padding:1.5rem 2rem;border-top:1px solid #e6dfe8;display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;color:#817589;font-size:.73rem}footer a{color:inherit}footer nav{flex-wrap:wrap}footer button{font-size:.73rem}.workspace-head{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin:1rem 0 1.6rem}.workspace-head h1{font-size:2.7rem;margin:0}.toolbar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.toolbar .tabs{margin:0}.toolbar label{min-width:150px;flex:1;margin:0}.toolbar>button{font-size:.8rem}.guide{margin:1rem 0 1.5rem;background:#eee8f4;border-radius:9px;padding:.9rem 1rem}.guide>summary{font-weight:650}.guide details{padding:.6rem 0}.guide p{font-size:.9rem}.stats{font-size:.9rem;color:#72627d;padding:.8rem 0;border-bottom:1px solid #e4dce9}.selection{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:.7rem 0}.selection label,.checkline{display:flex;align-items:center;font-size:.8rem}.selection button{font-size:.78rem}#cards{display:grid;gap:.8rem}.row{display:flex;align-items:center;gap:1rem;background:white;border:1px solid #e0d8e5;border-left:4px solid #b9a3d6;border-radius:9px;padding:1.2rem}.row:nth-child(even){border-left-color:#a8c9b4}.row>div:not(.row-actions){flex:1;min-width:0}.row h3{font-size:1.05rem;line-height:1.5;margin:.4rem 0;overflow-wrap:anywhere}.row small{color:#796986;font-size:.72rem}.topic{color:#766081;font-size:.72rem;font-weight:600}.row-actions{display:flex;gap:.3rem;flex-wrap:wrap}.row-actions button{font-size:.75rem}.empty{padding:3rem 1rem;text-align:center;border:1px dashed #cbbcd6;border-radius:12px}.notice{background:#eee5f4;border:1px solid #d2bddf;padding:.9rem;border-radius:9px;font-size:.85rem}.notice button{font-size:.85rem}#learn-view{max-width:700px;margin:1.5rem auto}#study{perspective:1000px}.study-card{position:relative;background:#f0eaf6;border:1px solid #ded1e7;border-radius:11px;padding:2rem;box-shadow:7px 8px 0 #dceade;margin:1rem 0 2rem}.study-card>h2{font-size:1.9rem;line-height:1.3;white-space:pre-wrap;overflow-wrap:anywhere;margin:1.6rem 0}.study-card .row-actions{justify-content:flex-end}.study-card>.button{margin-top:1.5rem}.study-card.revealed{background:#fff;animation:reveal .45s ease}.study-card.revealed>h2{font-size:1.15rem;font-weight:500;color:#74627e}.answer{background:#e1eee5;border-radius:9px;padding:1.4rem;margin:1rem 0}.answer small{font-size:.65rem;letter-spacing:.12em;color:#587263}.answer p{font-size:1.55rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:.7rem 0 0}.ratings{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.ratings button{font-size:.8rem;border:0}.safe{background:#dfefe4;color:#396b4d}.partial{background:#ece3f7;color:#705090}.learning{background:#f5e5df;color:#965747}details>p{white-space:pre-wrap;overflow-wrap:anywhere}summary{cursor:pointer;line-height:1.5}dialog{border:1px solid #d5c7df;border-radius:14px;padding:1.7rem;color:var(--ink);background:#fdfbf8;width:min(560px,calc(100% - 2rem));max-height:90dvh;overflow:auto}dialog::backdrop{background:#27202e66}dialog p{color:#776a81;font-size:.9rem}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:1rem}.dialog-head h2{margin:0}.dialog-head button{font-size:1.3rem}.dialog-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1.3rem}.danger{background:#a54953;color:#fff;border:0}#import-preview p{max-height:110px;overflow:auto;border-top:1px solid #e8dfed;padding-top:.6rem}#editor-note,#confirm-note{color:#a13e50}a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #aa91cc;outline-offset:3px}[hidden]{display:none!important}.legal{max-width:760px}.legal h1{font-size:2.5rem}.legal h2{margin-top:2rem}.legal a{overflow-wrap:anywhere}@keyframes reveal{0%{transform:rotateY(-85deg);opacity:.3}100%{transform:rotateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.demo-inner{transition:none}.study-card.revealed{animation:none}}@media(max-width:780px){header{padding:1rem 1.2rem}.brand{font-size:1.9rem}main{padding:1rem 1.2rem 2rem}.hero{grid-template-columns:1fr;gap:2rem}.hero h1{font-size:3.8rem}.hero>.access{max-width:520px;width:100%;margin:auto}.lead{font-size:1rem}.demo-card{width:265px;height:205px}.access{padding:1.5rem}.workspace-head{align-items:flex-start;flex-wrap:wrap}.workspace-head h1{font-size:2rem}.toolbar{gap:.5rem}.toolbar>.tabs{width:100%}.toolbar>button{flex:1}.row{flex-wrap:wrap;padding:1rem}.row-actions{margin-left:auto}.selection{flex-direction:column;align-items:flex-start;gap:0}.study-card{padding:1.4rem}.study-card>h2{font-size:1.6rem}.ratings button{padding:.6rem .3rem;font-size:.7rem}.answer p{font-size:1.3rem}footer{padding:1.4rem 1.2rem}.hero h1{font-size:clamp(3rem,12vw,4rem)}}

#landing .hero h1{font-size:clamp(2.5rem,5.2vw,5rem);line-height:1.06}#landing .hero .lead{font-size:clamp(1rem,1.6vw,1.2rem);line-height:1.5}

.card-picture{display:block;max-width:100%;max-height:280px;object-fit:contain;margin:1rem auto}.favorite[aria-pressed="true"]{background:#fff0b8;color:#694b00}.selection{flex-wrap:wrap;gap:.6rem}.row .topic{display:block}.hero h1{overflow-wrap:normal}#share-url{width:100%}#offline-note:not(:empty){padding:1rem;background:#fff0b8;border-radius:12px}#landing .hero h1{font-size:clamp(2.3rem,4.3vw,4.4rem)}

.share-page{max-width:760px;margin:2rem auto;padding:1rem}.image-preview{max-width:100%;max-height:180px}

.swipe-pad{touch-action:none;user-select:none;min-height:90px;display:flex;align-items:center;justify-content:center;background:#f0e9f7;border:1px dashed #b49acf;border-radius:14px;margin-top:1rem;padding:1rem;font-size:.9rem;color:#66537d}.study-card{transition:transform .12s ease}@media(prefers-reduced-motion:reduce){.study-card{transition:none}}

.gesture-demo{position:relative;max-width:450px;margin-top:2.2rem}.gesture-demo .demo-card{margin-top:0}.gesture-up{display:flex;flex-direction:column;align-items:center;width:100%;color:#80641b;font-weight:600}.gesture-up svg{width:70px;height:58px}.gesture-sides{display:flex;justify-content:space-between;gap:20px;margin-top:12px;color:#70548f;font-size:.9rem}.gesture-sides>div{display:flex;flex-direction:column;align-items:center}.gesture-sides svg{width:130px;height:40px}.gesture-demo svg{overflow:visible;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:5 7;animation:gesture-flow 4s linear infinite}@keyframes gesture-flow{to{stroke-dashoffset:-48}}@media(prefers-reduced-motion:reduce){.gesture-demo svg{animation:none}}

/* Compact workspace with a dedicated learning view. */
html,body{max-width:100%;overflow-x:clip}main,header,nav,.toolbar,.toolbar>*{min-width:0}select{max-width:100%;min-width:0}.file-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}.is-learning .workspace-head,.is-learning>.guide{display:none}.is-learning #stats{font-size:.78rem;padding:.4rem 0;margin:.5rem 0}.is-learning #learn-view{margin:.5rem auto}.is-learning .toolbar>.tabs{width:100%}.is-learning #offline-note:empty{display:none}.study-card{min-height:320px}.guide #add-examples{margin:.7rem 0}
@media(max-width:780px){
body.workspace-mode header{padding:.5rem .85rem;gap:.5rem}.workspace-mode .brand{font-size:1.45rem;gap:.3rem}.workspace-mode .brand img{width:26px;height:30px}.workspace-mode #topnav{gap:.4rem;font-size:.8rem;flex-wrap:wrap;justify-content:flex-end}.workspace-mode #topnav span{max-width:110px;overflow:hidden;text-overflow:ellipsis}.workspace-mode main{padding:.5rem .85rem 1.5rem}.workspace-head{margin:.5rem 0 .75rem;gap:.5rem;align-items:center}.workspace-head h1{font-size:1.45rem}.workspace-head .eyebrow{display:none}.workspace-head .button{font-size:.85rem;padding:.65rem .8rem}.guide{margin:.5rem 0 .75rem;padding:.6rem .75rem;font-size:.85rem}.toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.5rem}.toolbar>.tabs{grid-column:1/-1;min-width:0}.toolbar label{min-width:0;font-size:.75rem}.toolbar select{font-size:1rem;padding:.5rem .35rem}.toolbar .tabs button{min-height:48px;font-weight:650;font-size:1rem}.toolbar .tabs .active{background:var(--purple);color:white}.file-actions button{flex:1;font-size:.75rem;padding:.5rem;min-width:0}.study-card{padding:1rem;margin:.6rem 0 1.1rem;min-height:340px}.study-card>h2{font-size:1.55rem;margin:1rem 0}.answer{padding:1rem}.answer p{font-size:1.25rem}.checkline{margin:.5rem 0}.selection{gap:.4rem}.selection button{max-width:100%}.row{gap:.5rem}footer{padding:1rem}.gesture-demo{max-width:100%}
}

/* Learning comes first at every screen size. */
.workspace-mode header{padding:.7rem 1.2rem}.workspace-mode .brand{font-size:1.65rem}.workspace-mode .brand img{width:30px;height:34px}.workspace-mode #topnav{font-size:.85rem}.workspace-head{margin:.5rem 0 .8rem}.workspace-head .eyebrow{display:none}.workspace-head h1{font-size:1.8rem}.workspace-head .button{padding:.65rem .9rem;font-size:.9rem}.guide{padding:.55rem .8rem;margin:.5rem 0 .8rem;font-size:.85rem}.toolbar{display:grid;grid-template-columns:minmax(220px,2fr) minmax(120px,1fr) minmax(120px,1fr);gap:.75rem;align-items:end}.toolbar>.tabs{width:100%;margin:0}.toolbar label{min-width:0;font-size:.75rem}.toolbar .tabs button{min-height:48px;font-size:1rem;font-weight:650}.toolbar .tabs .active{background:var(--purple);color:white}.is-learning .toolbar>.tabs{width:100%}.card-tools{margin:.75rem 0;color:var(--muted);font-size:.8rem}.card-tools>summary{display:list-item;width:fit-content;padding:.35rem 0}.card-tools[open]{padding:.65rem;border:1px solid #e4dce8;border-radius:8px}.card-tools .file-actions{margin:.65rem 0}.card-tools button{font-size:.78rem;padding:.45rem .65rem}.card-tools .selection{justify-content:flex-start;flex-wrap:wrap;gap:.5rem}.stats{font-size:.8rem;padding:.4rem 0;margin:.5rem 0}.is-learning #learn-view{max-width:850px}.study-card{min-height:360px}.workspace-mode #offline-note:empty{display:none}
@media(max-width:780px){.toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.toolbar>.tabs{grid-column:1/-1}.workspace-head h1{font-size:1.45rem}.workspace-mode header{padding:.5rem .85rem}.workspace-mode .brand{font-size:1.45rem}.card-tools .selection{align-items:stretch}.study-card{min-height:340px}}

/* Approved 0.3.2: question first, answer first after revealing. */
#learn-view{max-width:850px}.study-card{display:flex;flex-direction:column;align-items:stretch;min-height:420px;padding:1.8rem 2rem;background:#fff;border:1px solid #d8c6ef;border-radius:16px;box-shadow:8px 8px 0 #dfede3;margin:1rem 0}.study-card>.topic{order:0;text-align:center;font-size:.75rem;font-weight:400}.study-card>h2{order:1;text-align:center;font-size:clamp(2rem,4vw,3.3rem);font-weight:750;line-height:1.2;letter-spacing:-.035em;margin:auto 0;padding:2rem 0;white-space:pre-wrap}.study-card.long-question>h2{font-size:clamp(1.5rem,3vw,2.2rem)}.study-card.revealed>h2{font-size:1rem;font-weight:450;letter-spacing:0;color:var(--muted);padding:0;margin:1.3rem 0 .5rem}.study-card>.card-picture{order:2;align-self:center}.study-card>.answer{order:3;text-align:center;padding:1.3rem;margin:.5rem 0 1rem;background:#e1f1e8}.study-card .answer p{font-size:clamp(1.6rem,3vw,2.3rem);font-weight:650;line-height:1.4;margin:.5rem 0 0}.study-card.long-answer .answer p{font-size:clamp(1.15rem,2.2vw,1.5rem);font-weight:550}.study-card>details{order:4;font-size:.85rem;margin:.4rem 0}.study-card>.row-actions{order:5;justify-content:flex-end;margin:.25rem 0;gap:.5rem}.study-card>.row-actions button{font-size:.78rem;min-height:44px;padding:.3rem .55rem}.study-card>.row-actions .favorite{margin-right:auto;background:transparent;border:0;color:var(--purple)}.study-card>.button{order:6;align-self:center;width:auto;font-size:.95rem;padding:.65rem 1.2rem;margin:.5rem 0 0}.study-card>.ratings{order:6;display:flex;justify-content:center;gap:.5rem;margin:.7rem 0 0}.study-card>.ratings button{flex:0 1 auto;width:auto;min-height:44px;font-size:.8rem;font-weight:500;padding:.5rem 1rem;border-radius:9px}.swipe-pad{background:transparent;border:0;text-align:center;font-size:.75rem;min-height:44px;margin:.25rem 0;padding:.75rem .2rem;color:var(--muted)}.toolbar .tabs button{border-radius:8px}.toolbar .tabs{border-radius:10px}
@media(max-width:780px){.study-card{min-height:360px;padding:1.15rem;margin:.6rem 0 .8rem}.study-card>h2{font-size:2.2rem;padding:1.6rem 0}.study-card.revealed>h2{font-size:.88rem;padding:0;margin:1rem 0 .4rem}.study-card .answer p{font-size:1.5rem}.study-card.long-answer .answer p{font-size:1.15rem}.study-card>.ratings{gap:.4rem}.study-card>.ratings button{font-size:.75rem;padding:.45rem .7rem;min-height:44px}.study-card>.row-actions button{font-size:.72rem}.swipe-pad{font-size:.7rem}.study-card>.answer{padding:1rem}}

#favorites-filter{min-height:44px;font-size:.85rem;align-self:end;color:var(--purple)}#favorites-filter[aria-pressed=true]{background:var(--purple);color:white;border-color:var(--purple)}

/* 0.3.5: secondary filters, primary learning navigation. */
#trainer .toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.15rem .7rem}
#trainer .toolbar>.tabs{flex:0 0 100%;width:100%;margin-bottom:.35rem}
#trainer .toolbar>#favorites-filter{flex:0 0 auto;min-height:44px;padding:.35rem .45rem;font-size:.78rem;font-weight:400;color:var(--muted);background:transparent;border:0;border-radius:5px;align-self:center}
#trainer .toolbar>#favorites-filter[aria-pressed=true]{background:transparent;color:var(--purple);font-weight:650;text-decoration:underline;text-underline-offset:4px}
#trainer .toolbar>label{display:block;flex:0 1 210px;width:auto;min-width:0;margin:0;font-size:0;font-weight:400}
#trainer .toolbar select{font-size:.78rem;font-weight:400;min-height:44px;padding:.35rem 1.6rem .35rem .45rem;color:var(--muted);background:transparent;border:0;border-radius:5px;max-width:100%;width:100%}
#trainer .toolbar select:focus-visible,#trainer .toolbar>#favorites-filter:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
@media(max-width:780px){#trainer .toolbar{justify-content:flex-end;gap:0 .45rem}#trainer .toolbar>label{flex:0 1 165px}#trainer .toolbar>.tabs{margin-bottom:.1rem}#trainer .toolbar select,#trainer .toolbar>#favorites-filter{font-size:.75rem}}

#guide-shell{position:relative}#guide-shell .guide{padding-right:3rem}#dismiss-guide{position:absolute;right:.15rem;top:0;min-width:44px;min-height:44px;font-size:1.25rem;text-decoration:none;z-index:1}#show-guide{font-size:.75rem;min-height:44px}.is-learning #guide-shell,.is-learning #show-guide{display:none}

#list-view>.card-tools{padding:0;border:0;margin:.65rem 0;background:none}#list-view>.card-tools .file-actions{margin:.5rem 0}#list-view>.card-tools .selection{margin:.5rem 0}
