@font-face{font-family:system-fallback;src:local('Segoe UI')}*{box-sizing:border-box} :root{font-family:'Segoe UI',system-ui,sans-serif;color:#1d2c42;background:#f3f6fb;font-synthesis:none;--blue:#214f85;--deep:#153860;--muted:#66758a;--border:#dde5ef;--green:#137d61}body{margin:0;font-size:16px;line-height:1.5}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a{color:var(--blue)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #77b1fd;outline-offset:3px}button{border:0}button svg{flex-shrink:0}svg{vertical-align:middle}.icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.skip{position:fixed;top:-100px;left:20px;background:#fff;z-index:99;padding:12px}.skip:focus{top:10px}.layout{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:234px;background:#fff;border-right:1px solid var(--border);display:flex;flex-direction:column;padding:32px 20px;z-index:5}.brand{display:flex;gap:12px;align-items:center;padding:0 9px 32px}.brand-mark{width:43px;height:48px;border-radius:11px;background:var(--blue);color:white;display:grid;place-items:center}.brand-mark .icon{width:28px;height:28px}.brand strong{font-size:17px;letter-spacing:.035em}.brand small{display:block;font-size:12px;letter-spacing:.16em;color:var(--muted)}nav{display:grid;gap:8px}.nav-button{display:flex;align-items:center;gap:13px;text-align:left;padding:13px 15px;border-radius:10px;background:transparent;color:#68778b;font-weight:600}.nav-button.active{color:var(--blue);background:#eaf1fb}.nav-button:hover{background:#f1f5fa}.nav-button .count{margin-left:auto;background:#fff;padding:0 7px;border-radius:6px;font-size:12px}.side-caption{font-size:11px;font-weight:700;letter-spacing:.15em;color:#78869a;margin:28px 15px 12px}.sidebar-bottom{margin-top:auto;padding:20px 12px 0}.local-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid #ceddeb;border-radius:5px;color:#566d8a;font-size:12px}.sidebar-bottom p{font-size:12px;color:var(--muted);margin-top:9px}.user{display:flex;align-items:center;gap:10px;border-top:1px solid var(--border);padding-top:18px;margin-top:21px;font-size:14px}.avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#e8edf5;color:var(--blue);font-weight:700}.user small{display:block;color:var(--muted);font-size:12px}.workspace{margin-left:234px}.topbar{height:78px;padding:0 42px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background:#ffffffc9;gap:15px}.breadcrumb{color:var(--muted);font-size:14px}.breadcrumb strong{color:#263c59;font-weight:600}.top-meta{display:flex;gap:18px;align-items:center;color:#536681;font-size:13px}.top-meta>span{display:flex;align-items:center;gap:7px}.main{max-width:1340px;margin:auto;padding:38px 42px 50px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:.15em;color:var(--blue);text-transform:uppercase;margin:0 0 8px}h1{font-size:31px;line-height:1.22;letter-spacing:-.035em;font-weight:730;margin:0}h2{font-size:20px;line-height:1.3;margin:0;letter-spacing:-.02em}h3{font-size:17px;line-height:1.4;margin:0}p{margin:8px 0 0}.muted{color:var(--muted)}.subheading{color:var(--muted);font-size:14px;margin-top:9px}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;border-radius:9px;padding:11px 17px;font-size:14px;font-weight:650;line-height:1.35;background:var(--blue);color:#fff;text-decoration:none;transition:background .15s,transform .15s}.button:hover{background:var(--deep)}.button.secondary{background:#fff;color:#304964;border:1px solid #d6e0eb}.button.secondary:hover{background:#f4f7fb}.button.ghost{background:transparent;color:var(--blue)}.button.ghost:hover{background:#e8eff9}.button.danger{background:#fff0f0;color:#a64047;border:1px solid #efd1d4}.button.small{min-height:36px;padding:7px 11px;font-size:13px}.icon-button{display:inline-grid;place-items:center;width:40px;height:40px;background:#fff;border:1px solid var(--border);border-radius:9px;color:#718099}.icon-button.active{background:#fff7da;border-color:#edd997;color:#976b10}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:26px}.stat{background:#fff;border:1px solid var(--border);border-radius:12px;padding:19px 22px;display:flex;align-items:center;gap:14px}.stat-icon{color:var(--blue);background:#eef3fb;border-radius:10px;width:42px;height:42px;display:grid;place-items:center}.stat-icon.orange{color:#ac651f;background:#fff3e6}.stat-icon.green{color:var(--green);background:#e8f6f0}.stat strong{font-size:25px;display:block;line-height:1.15;font-weight:700}.stat span{font-size:12px;color:var(--muted)}.study-grid{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(260px,1fr);gap:22px;margin-bottom:32px}.composer{border-radius:16px;background:var(--blue);color:white;padding:29px 30px;position:relative;overflow:hidden;box-shadow:0 5px 12px #15386010}.composer h2{font-size:26px}.composer .eyebrow{color:#c5d8f4}.composer .intro{font-size:14px;color:#d3e1f4;max-width:420px;margin-top:10px}.composer .spark{position:absolute;right:29px;top:24px;color:#a4c5ee}.composer .spark .icon{width:36px;height:36px}.mode-options{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:25px 0 22px}.mode{display:flex;gap:7px;align-items:center;justify-content:center;background:#ffffff0b;border:1px solid #ffffff35;color:#e4edfa;border-radius:8px;padding:10px 6px;font-size:12px;font-weight:600;min-height:42px}.mode.selected{background:white;color:var(--blue);border-color:white}.mode .icon{width:16px;height:16px}.composer-fields{display:grid;grid-template-columns:1fr 110px;gap:12px}.field label,.field-label{display:block;font-size:13px;font-weight:650;margin-bottom:7px}.field input,.field select,.field textarea,.search{width:100%;border:1px solid #d4deea;background:#fff;border-radius:8px;color:#263b57;padding:11px 12px;min-height:45px;font-size:14px}.field textarea{resize:vertical;min-height:88px}.composer select,.composer input{border:1px solid #ffffff3a;background:#173f6d;color:white;appearance:auto}.composer select option{background:#fff;color:#263b57}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:23px;gap:14px}.composer .button{color:var(--blue);background:#fff;padding-inline:23px}.composer .button:hover{background:#edf4ff}.composer-foot{font-size:12px;color:#c8dcf5}.side-panels{display:grid;gap:16px}.panel{border:1px solid var(--border);border-radius:14px;padding:22px;background:#fff}.goal-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.goal-heading h3{font-size:15px}.mini-edit{background:transparent;color:var(--blue);font-size:12px;padding:5px}.goal-number{font-size:31px;font-weight:700;margin:9px 0 12px;letter-spacing:-.04em}.goal-number small{font-size:15px;font-weight:400;color:var(--muted);letter-spacing:0}.bar-track{height:7px;background:#e9eef5;border-radius:10px;overflow:hidden}.bar-fill{height:100%;background:var(--blue);border-radius:10px}.goal-note{color:var(--muted);font-size:12px;margin-top:11px}.tip{background:#eaf1fa;border-color:#dae6f6;display:flex;align-items:flex-start;gap:12px}.tip .icon{color:var(--blue);flex-shrink:0;margin-top:2px}.tip h3{font-size:14px;color:var(--blue)}.tip p{font-size:13px;color:#566d8a;line-height:1.6}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}.section-heading p{font-size:13px;color:var(--muted);margin-top:5px}.deck-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.deck-card{border:1px solid var(--border);border-radius:12px;background:#fff;padding:21px;display:flex;flex-direction:column;min-height:215px}.deck-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:15px}.topic-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:10px;background:#eaf1fb;color:#315f98;font-weight:750;font-size:14px}.topic-icon.purple{background:#f0eafc;color:#7954ac}.topic-icon.teal{background:#e6f4f2;color:#1c8175}.topic-icon.orange{background:#fff2e3;color:#9f6423}.tag{font-size:10px;letter-spacing:.07em;text-transform:uppercase;font-weight:700;color:#718099;border:1px solid #e4eaf2;border-radius:4px;padding:3px 6px}.deck-card h3{font-size:16px;letter-spacing:-.01em;flex:1}.deck-meta{font-size:12px;color:var(--muted);margin-top:7px}.deck-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #edf1f6;padding-top:14px;margin-top:18px;gap:10px}.deck-footer span{font-size:12px;color:#66778c}.deck-link{background:transparent;padding:3px 0;color:var(--blue);font-size:13px;font-weight:700;display:flex;gap:5px;align-items:center}.deck-link .icon{width:16px;height:16px}.resume{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fff8e6;border:1px solid #ecdbaa;border-radius:12px;padding:17px 21px;margin-bottom:24px}.resume h3{font-size:15px;color:#785a21}.resume p{font-size:13px;color:#856e41}.actions{display:flex;gap:9px;flex-wrap:wrap}.toolbar{display:flex;gap:12px;align-items:center;margin-bottom:20px;flex-wrap:wrap}.segmented{display:flex;gap:4px;background:#e6edf6;padding:4px;border-radius:9px}.segmented button{padding:8px 15px;border-radius:6px;background:transparent;font-size:13px;color:#596d87}.segmented button.active{background:white;box-shadow:0 2px 4px #172e4810;color:var(--blue);font-weight:650}.search-wrap{position:relative;flex:1;min-width:180px}.search-wrap .icon{position:absolute;left:13px;top:12px;width:19px;color:#7e8ca0}.search{padding-left:41px}.toolbar select{padding:11px;border:1px solid var(--border);border-radius:8px;background:white;color:#52667f;max-width:240px;font-size:14px}.empty{padding:44px 24px;text-align:center;background:white;border:1px dashed #cbd7e6;border-radius:13px;color:var(--muted)}.empty .icon{width:35px;height:35px;color:#91a9c7}.empty h2{margin:12px 0 8px;color:#354d6a}.empty p{max-width:480px;margin:0 auto 18px;font-size:14px}.pagination{display:flex;justify-content:center;align-items:center;gap:15px;margin-top:25px;font-size:13px;color:var(--muted)}.source-note{font-size:12px;line-height:1.7;color:var(--muted);margin-top:25px}.source-note button{font:inherit}.back-link{display:flex;align-items:center;gap:7px;background:transparent;color:var(--muted);font-size:13px;padding:0;margin-bottom:20px}.card-list{display:grid;gap:12px}.card-row{background:white;border:1px solid var(--border);border-radius:11px;padding:20px;display:grid;grid-template-columns:1fr auto;gap:20px}.card-row .question{font-size:15px;font-weight:600;white-space:pre-wrap;overflow-wrap:anywhere}.card-row details{margin-top:9px;font-size:14px}.card-row summary{cursor:pointer;color:var(--blue);font-size:13px}.card-row .answer{color:var(--green);white-space:pre-wrap;margin-top:11px}.card-row .explanation{font-size:13px;color:var(--muted);white-space:pre-wrap;max-height:300px;overflow:auto}.card-row .row-actions{display:flex;gap:5px;align-items:flex-start}.card-row .row-actions .icon-button{width:34px;height:34px}.card-row small{font-size:11px;color:#7d8da2;display:block;margin-top:12px}.study-wrap{max-width:840px;margin:0 auto}.study-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:15px}.study-header h1{font-size:23px}.study-progress{display:flex;align-items:center;gap:15px;margin-bottom:23px;font-size:12px;color:var(--muted)}.study-progress .bar-track{flex:1;height:5px}.flashcard{background:#fff;border:1px solid #d5dfec;border-radius:18px;box-shadow:0 8px 30px #1d46740a;padding:30px 36px;min-height:340px;display:flex;flex-direction:column}.flashcard-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.flashcard-top span{font-size:12px;color:var(--blue);font-weight:650}.flashcard-question{font-size:25px;font-weight:600;line-height:1.5;letter-spacing:-.025em;margin:28px 0;white-space:pre-wrap;overflow-wrap:anywhere}.flashcard-hint{margin-top:auto;font-size:13px;color:#60748e}.flashcard-hint summary{cursor:pointer}.flashcard-hint p{white-space:pre-wrap;padding:10px 14px;background:#f4f7fb;border-radius:8px;line-height:1.8}.flashcard-answer{border-top:1px solid var(--border);padding-top:24px;margin-top:5px}.flashcard-answer .eyebrow{color:var(--green)}.flashcard-answer .answer{font-size:21px;font-weight:650;color:var(--green);white-space:pre-wrap;overflow-wrap:anywhere}.flashcard-answer .explanation{font-size:14px;color:#536780;white-space:pre-wrap;margin-top:20px;line-height:1.8;overflow-wrap:anywhere}.recall{margin:20px 0 0}.recall textarea{background:transparent;border-style:dashed;font-size:14px;min-height:80px}.study-controls{margin-top:21px;display:flex;justify-content:center;gap:12px}.study-controls .reveal{width:100%;min-height:51px;font-size:15px}.grade{flex:1;border:1px solid var(--border);border-radius:10px;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-weight:650;font-size:14px}.grade small{font-weight:400;font-size:11px}.grade.again{background:#fff0f0;color:#a13f47;border-color:#edcfd2}.grade.hard{background:#fff6e5;color:#986520;border-color:#ecd8b5}.grade.good{background:#eaf7ef;color:#217a50;border-color:#c1e2ce}.study-footnote{font-size:12px;color:var(--muted);text-align:center;margin:15px 0}.study-source{font-size:11px;color:#7d8fa5;display:flex;justify-content:space-between;gap:12px;margin-top:18px}.note-box{margin-top:19px}.note-box summary{font-size:13px;color:var(--blue);cursor:pointer}.note-box textarea{margin:10px 0;min-height:80px}.recap{text-align:center;max-width:620px;margin:35px auto}.recap-mark{margin:0 auto 22px;width:76px;height:76px;border-radius:50%;background:#e1f3e9;color:#218456;display:grid;place-items:center}.recap-mark .icon{width:37px;height:37px}.recap h1{font-size:32px}.recap p{color:var(--muted);font-size:15px}.recap-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0}.recap-stat{padding:21px 8px;background:white;border:1px solid var(--border);border-radius:12px}.recap-stat strong{display:block;font-size:29px}.recap-stat span{font-size:12px;color:var(--muted)}.recap .actions{justify-content:center;margin-top:24px}.progress-columns{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;margin-bottom:25px}.week-chart{height:185px;display:flex;align-items:flex-end;justify-content:space-around;gap:10px;padding-top:22px;margin-top:10px}.day-bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;flex:1;font-size:11px;color:#7c8a9e;gap:8px}.day-bar i{display:block;width:100%;max-width:28px;background:#b6cbea;border-radius:5px 5px 2px 2px;min-height:3px}.day-bar:last-child i{background:var(--blue)}.day-bar strong{font-size:12px;color:var(--blue)}.mastery{display:grid;gap:22px;margin-top:24px}.mastery-label{display:flex;justify-content:space-between;font-size:13px;margin-bottom:8px}.history-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border-top:1px solid #eaf0f7;padding:16px 0;font-size:14px}.history-row small{display:block;font-size:12px;color:var(--muted);margin-top:3px}.history-row .tag{white-space:nowrap}.loading{padding:60px;text-align:center;color:var(--muted)}#toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%);z-index:100;background:#183753;color:#fff;border-radius:10px;box-shadow:0 6px 22px #142c3933;padding:13px 20px;max-width:min(90vw,550px);font-size:14px;display:none}#toast.show{display:block}dialog{border:1px solid var(--border);border-radius:17px;padding:0;max-width:760px;width:calc(100% - 32px);max-height:90vh;box-shadow:0 25px 90px #15335230;color:#253851}dialog::backdrop{background:#152d4b65;backdrop-filter:blur(3px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:23px 27px;border-bottom:1px solid var(--border);gap:14px;position:sticky;top:0;background:white;z-index:2}.dialog-header h2{font-size:20px}.dialog-body{padding:24px 27px}.dialog-body .field{margin-bottom:17px}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:18px 27px;border-top:1px solid var(--border);background:#f8fafc;position:sticky;bottom:0}.dialog-description{color:var(--muted);font-size:14px;margin:0 0 20px}.editor-row{border:1px solid var(--border);border-radius:10px;padding:16px;margin:12px 0;background:#fafcfe}.editor-row-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:12px;font-weight:700;color:var(--blue)}.editor-row .field{margin-bottom:10px}.editor-row textarea{min-height:74px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.batch-add{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px;font-size:13px;color:var(--muted)}.batch-add input{width:67px;padding:8px;border:1px solid var(--border);border-radius:6px}.form-error{font-size:13px;color:#ab3546;background:#fff0f2;padding:11px;border-radius:7px;margin-bottom:15px;display:none}.form-error:not(:empty){display:block}.import-area{display:none}.import-area.visible{display:block}.import-help{font-size:12px;color:var(--muted);margin-bottom:10px}.review-list{padding-left:20px;font-size:14px;line-height:1.8}.source-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.source-cell{background:#f1f5fa;border-radius:9px;padding:15px}.source-cell strong{display:block;font-size:23px}.source-cell span{font-size:12px;color:var(--muted)}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(min-width:1500px){.main{padding-top:43px}.study-grid{grid-template-columns:1.8fr 1fr}.composer{padding:33px 36px}}@media(max-width:1150px){.sidebar{width:204px;padding:28px 14px}.workspace{margin-left:204px}.brand{padding-inline:3px}.brand strong{font-size:15px}.main{padding:29px 26px}.topbar{padding:0 26px}.study-grid{grid-template-columns:1.7fr 1fr;gap:16px}.composer{padding:25px 23px}.stat{padding:16px 14px;gap:10px}.stat-icon{width:34px;height:34px}.stats{gap:10px}.mode-options{grid-template-columns:repeat(2,1fr)}.deck-grid{gap:12px}.deck-card{padding:17px}}@media(max-width:900px){.sidebar{width:82px;padding:23px 12px}.brand{padding:0 6px 29px}.brand div:last-child,.nav-button span,.side-caption,.sidebar-bottom{display:none}.brand-mark{width:43px}.nav-button{justify-content:center;padding:14px}.workspace{margin-left:82px}.study-grid{grid-template-columns:1.5fr 1fr}.composer-bottom{align-items:flex-start;flex-direction:column}.deck-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-icon{display:none}.progress-columns{grid-template-columns:1fr 1fr}.top-meta .date{display:none}.topbar{height:65px}.main{padding:27px 24px}}@media(max-width:680px){.sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;width:100%;height:70px;padding:8px 12px 10px;border-right:0;border-top:1px solid var(--border);background:#fff;z-index:10}.brand{display:none}.sidebar nav{display:flex;justify-content:space-around;gap:4px}.nav-button{flex:1;display:flex;flex-direction:column;gap:3px;padding:5px 6px;font-size:10px;min-height:48px}.nav-button span{display:block}.nav-button .count{display:none}.nav-button .icon{width:20px;height:20px}.workspace{margin:0}.topbar{height:61px;padding:0 19px}.breadcrumb{font-size:12px}.top-meta{font-size:11px;gap:8px}.top-meta .icon{width:17px}.main{padding:25px 18px 104px}.page-heading{align-items:flex-start;margin-bottom:23px;gap:12px}.page-heading .button{font-size:12px;padding:10px 12px;min-height:41px}.page-heading .button .icon{width:17px}h1{font-size:25px}.eyebrow{font-size:10px}.subheading{font-size:13px}.stats{grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:20px}.stat{padding:16px}.stat-icon{display:grid;width:33px;height:33px}.stat strong{font-size:22px}.stat span{font-size:11px}.study-grid{grid-template-columns:1fr;gap:16px;margin-bottom:28px}.composer{padding:25px 22px}.composer h2{font-size:25px}.composer .spark{right:22px}.composer .intro{font-size:13px;max-width:260px}.composer-bottom{flex-direction:row;align-items:center}.composer-foot{font-size:11px}.composer .button{padding-inline:17px}.mode-options{grid-template-columns:repeat(2,1fr);margin-top:22px}.side-panels{grid-template-columns:1fr}.side-panels .tip{display:none}.panel{padding:20px}.goal-number{margin:5px 0 10px;font-size:25px}.goal-heading h3{font-size:14px}.deck-grid{grid-template-columns:1fr}.deck-card{min-height:190px;padding:20px}.section-heading h2{font-size:18px}.section-heading .button{padding-right:0;font-size:12px}.section-heading p{font-size:12px}.resume{align-items:flex-start;padding:17px;flex-direction:column}.resume .actions{width:100%}.toolbar{gap:10px}.segmented{width:100%}.segmented button{flex:1;font-size:12px;padding-inline:8px}.toolbar select{width:100%;max-width:none}.progress-columns{grid-template-columns:1fr}.card-row{padding:17px;gap:10px}.card-row .row-actions{flex-direction:column}.study-header h1{font-size:20px}.study-header .button{font-size:12px;padding-inline:12px}.flashcard{padding:23px 21px;border-radius:13px;min-height:330px}.flashcard-question{font-size:21px;margin:25px 0}.flashcard-top span{font-size:11px;max-width:85%}.flashcard-answer .answer{font-size:19px}.study-controls{gap:7px}.grade{font-size:12px;padding:11px 5px;min-height:70px}.grade small{font-size:10px}.study-source{font-size:10px}.recap{margin:20px auto}.recap h1{font-size:27px}.recap-stat strong{font-size:25px}.recap-stat span{font-size:11px}.recap-stats{gap:8px}.two-col{grid-template-columns:1fr;gap:0}.dialog-header{padding:18px}.dialog-body{padding:18px}.dialog-footer{padding:15px 18px}.dialog-header h2{font-size:18px}.editor-row{padding:13px}#toast{bottom:83px}.history-row{font-size:12px}.source-grid{gap:8px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}@media(min-width:681px){.mobile-only{display:none}}

body:has(dialog[open]){overflow:hidden}@media(max-width:400px){.stat-icon{display:none}.stat{padding:12px 14px}.stat strong{font-size:21px}.page-heading{margin-bottom:19px}.stats{margin-bottom:18px}}
.deck-footer-left{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}.deck-delete{display:inline-flex;align-items:center;gap:5px;padding:3px 0;background:transparent;color:#a13f47;font-size:13px;font-weight:700}.deck-delete:hover{color:#7f2932;text-decoration:underline}.deck-delete .icon{width:16px;height:16px}.deck-footer-left:empty{min-height:1px}.deck-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}.deck-manage{padding:3px 0;background:transparent;color:var(--muted);font-size:13px;font-weight:650}.deck-manage:hover{color:var(--blue);text-decoration:underline}@media(max-width:420px){.deck-footer{align-items:flex-end}.deck-footer-actions{flex-direction:column-reverse;align-items:flex-end;gap:5px}}
/* Whole-card recall interaction. Both faces share a grid cell and grow with text. */
.deck-card[data-action]{cursor:pointer}
.study-wrap{max-width:800px;margin:0 auto}
.study-header h1{font-size:26px;line-height:1.3;max-width:560px}
.study-header .button{flex-shrink:0}
.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 2px 12px;color:#71829a;font-size:13px}
.flip-card{display:block;width:100%;padding:0;border:0;background:none;text-align:center;cursor:pointer;perspective:1600px;border-radius:24px;color:#173753;font:inherit;-webkit-tap-highlight-color:transparent}
.flip-card:focus-visible{outline:3px solid #326ec6;outline-offset:6px}
.flip-inner{display:grid;position:relative;transform-style:preserve-3d;transition:transform .55s cubic-bezier(.2,.7,.2,1);width:100%}
.flip-card.is-flipped .flip-inner{transform:rotateY(180deg)}
.flip-face{grid-area:1/1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:370px;padding:35px 48px 28px;border:1px solid #c8d9ec;border-radius:24px;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:linear-gradient(145deg,#fff,#f5f9ff);box-shadow:0 14px 34px #254b7914,0 5px 0 -1px #e9f0f9,0 6px 0 0 #ccdbee;overflow-wrap:anywhere;white-space:pre-wrap}
.flip-back{transform:rotateY(180deg);background:linear-gradient(145deg,#f5fffd,#eaf6f4);border-color:#b3d9d0}
.flip-face .eyebrow{letter-spacing:.16em;font-size:11px;margin:0 0 20px}
.flip-symbol{display:grid;place-items:center;width:54px;height:54px;border:1px solid #d8e5f4;border-radius:18px;background:#edf4fd;margin:0 0 22px;color:#5785bb}
.flip-symbol .icon{width:26px;height:26px}
.flip-title{font-size:34px;font-weight:650;line-height:1.3;display:block;max-width:100%}
.flip-back .flip-title{color:#127765}
.flip-detail{font-size:16px;line-height:1.7;margin-top:24px;max-width:570px;color:#496b69}
.flip-cue{display:flex;align-items:center;justify-content:center;gap:9px;font-size:12px;font-weight:400;color:#758aa3;margin-top:36px}
.flip-cue .icon{width:17px;height:17px}
.study-controls{margin-top:26px}
[hidden]{display:none!important}
.study-controls .grade{min-height:78px}
.study-footnote{margin:19px 0;color:#71829a}
@media(max-width:700px){.study-header{align-items:flex-start;gap:16px}.study-header h1{font-size:21px}.study-header .button{font-size:12px;padding:10px}.study-header .button .icon{display:none}.flip-face{min-height:340px;padding:27px 22px;border-radius:20px}.flip-title{font-size:28px}.flip-detail{font-size:14px;line-height:1.6}.flip-symbol{width:45px;height:45px;margin-bottom:19px}.flip-cue{font-size:11px}.preview-toolbar{font-size:12px}.study-controls{gap:8px}.study-controls .grade{padding:12px 5px;font-size:12px}.study-controls .grade small{font-size:10px}.study-source{gap:10px;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.flip-inner{transition:none}}
.study-card-tools{justify-content:flex-end;margin-top:8px}dialog:has(.pending-session){max-width:540px}dialog:has(.pending-session) .dialog-header{border-bottom:0;padding-bottom:0}dialog:has(.pending-session) .dialog-footer{border-top:0;background:white}.pending-session{margin:0;font-weight:650;overflow-wrap:anywhere}.pending-help{margin:10px 0 0;color:var(--muted);font-size:14px}dialog:has(.pending-session) .form-error:not(:empty){margin:14px 0 0}
.session-navigation{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;margin-top:22px}.session-navigation .button:first-child{justify-self:start}.session-navigation .button:last-child{justify-self:end}.session-navigation span{color:var(--muted);font-size:13px;text-align:center}.history-review{margin:0 0 10px;padding:10px 14px;border:1px solid #d7e3f1;border-radius:10px;background:#edf4fd;color:#365d8c;font-size:13px;text-align:center}
@media(max-width:520px){dialog:has(.pending-session) .dialog-footer{flex-direction:column;align-items:stretch}dialog:has(.pending-session) .dialog-footer .button{width:100%}.session-navigation{grid-template-columns:1fr 1fr}.session-navigation span{grid-column:1/-1;grid-row:1}.session-navigation .button{width:100%}.session-navigation .button:first-child{grid-column:1}.session-navigation .button:last-child{grid-column:2}}
.long-card .flip-front .flip-title{font-size:25px;line-height:1.5}.long-card .flip-symbol{display:none}.flip-reference{display:block;margin-top:20px;font-size:12px;color:#607b78}.editor-intro{padding:24px 28px;margin-bottom:28px;border:1px solid #d4e1ef;border-radius:16px;background:#edf4fd}.editor-intro p{margin:8px 0}.editor-intro small{color:#657a96}.editor-status{font-size:11px;color:#237862;background:#eaf8f0;padding:5px 8px;border-radius:6px}.editor-status.draft{background:#fff3dd;color:#856016}.editor-metadata{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:24px}.editor-metadata .field:last-child{grid-column:1/-1}.editor-metadata .field{margin:0}.editor-workbench{display:grid;grid-template-columns:1fr 1fr;gap:26px;align-items:start}.editor-workbench>*{min-width:0}.editor-card-picker{margin-bottom:22px;padding-bottom:20px;border-bottom:1px solid #dde5ef}.editor-card-picker select{width:100%}.editor-preview{position:sticky;top:24px}.editor-preview .flip-face{padding:28px;min-height:420px}.editor-preview .flip-title{font-size:26px}.editor-preview .long-card .flip-front .flip-title{font-size:21px}.editor-workbench details{margin-top:20px}.editor-workbench summary{cursor:pointer;color:#536b89}.editor-workbench details .field{margin-top:18px}.editor-remove{margin-top:24px}.editor-remove button{color:#a44b50}.editor-withdraw{display:flex;gap:20px;justify-content:space-between;align-items:center;margin-top:28px;font-size:13px;color:#66758a}.severity-shortcuts{gap:4px}.editor-workbench textarea{resize:vertical}.editor-workbench .field{min-width:0}.editor-preview .flip-reference{font-size:11px}.editor-workbench input,.editor-metadata input{width:100%;min-width:0}
@media(max-width:1000px){.editor-workbench{grid-template-columns:1fr}.editor-preview{position:static}.editor-preview .flip-face{min-height:330px}.editor-withdraw{flex-direction:column;align-items:flex-start}.editor-metadata{grid-template-columns:1fr}.editor-metadata .field:last-child{grid-column:auto}}
@media(max-width:680px){.sidebar nav{grid-template-columns:repeat(4,1fr)}.sidebar nav .nav-button{font-size:10px;padding-inline:4px}.long-card .flip-front .flip-title{font-size:21px}.editor-intro{padding:20px}.editor-intro p{font-size:13px}.page-heading:has(#staff-status){flex-direction:column}.page-heading:has(#staff-status) .actions{width:100%;flex-wrap:wrap}.page-heading:has(#staff-status) .button{flex:1}.editor-preview .long-card .flip-front .flip-title{font-size:20px}.editor-status{font-size:10px}}

/* Keep editing controls inside the mobile viewport; 16px avoids iOS focus zoom. */
.editor-metadata>*,.editor-card-picker,.editor-card-picker .field{min-width:0}
.editor-card-picker select{max-width:100%}
.editor-metadata details{grid-column:1/-1}
.editor-metadata details .field{margin-top:12px}
@media(max-width:1000px){.editor-workbench .editor-preview{display:none}}
@media(max-width:768px),(pointer:coarse){
 input:not([type=checkbox]):not([type=radio]),select,textarea,
 .field input,.field select,.field textarea,.search,.toolbar select,.batch-add input,.recall textarea{font-size:16px}
 .dialog-body,.editor-metadata,.editor-workbench,.editor-workbench .panel{min-width:0;max-width:100%}
 .editor-workbench textarea,.editor-metadata input{max-width:100%}
 .editor-card-picker{display:flex;flex-wrap:wrap;gap:10px}
 .editor-card-picker .field{flex:1 1 100%}
}

/* Keep the prompt readable while recalling the answer. */
.flip-question{display:block;width:100%;max-width:570px;margin:0 0 24px;font-size:16px;font-weight:550;line-height:1.5;color:#4e676c;position:relative;top:-10px;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.flip-question{font-size:15px;margin-bottom:20px;top:-7px}}
/* Biblioteca: tema visible sin añadir otra fila de controles. */
.deck-topic{display:inline-flex;align-self:flex-start;margin-top:8px;padding:2px 8px;border-radius:6px;background:#f0f3f7;color:#617087;font-size:12px;font-weight:650}
.subject-filters{display:flex;gap:8px;overflow-x:auto;margin:18px 0 24px;padding:4px 2px 8px;scrollbar-width:thin}
.subject-filters button{flex:0 0 auto;border:1px solid var(--border);border-radius:999px;background:#fff;color:#41536b;padding:10px 16px;font:inherit;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s,color .15s,box-shadow .15s}
.subject-filters button:hover{border-color:#9db2cb;color:var(--deep)}
.subject-filters button.active{border-color:var(--blue);background:var(--blue);color:#fff;box-shadow:0 4px 12px rgba(33,79,133,.18)}
.subject-heading{margin:0 0 16px}
.subject-heading h2{margin:0;color:var(--deep);font-size:22px}
.subject-heading p{margin:4px 0 0;color:var(--muted);font-size:14px}
@media(max-width:720px){.subject-filters{margin-top:14px}.subject-filters button{padding:9px 13px;font-size:14px}.subject-heading h2{font-size:20px}}
.topic-label{display:inline-flex;align-items:center;min-height:39px;padding:0 12px;border-radius:10px;background:#eaf1fb;color:#315f98;font-size:13px;font-weight:750;white-space:nowrap}
.topic-icon.personal-deck{background:#f1e4d8;color:#745039}
.toolbar #category{min-height:45px;max-width:190px}
@media(max-width:700px){.toolbar #category{flex:1;max-width:none;min-width:130px}.toolbar .search-wrap{min-width:150px}}
.monthly-online-entry{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.25rem;margin:0 0 .75rem;border:1px solid #bfd6f0;border-radius:16px;background:#f4f8fe;color:#163d68}
.monthly-online-entry h2{font-size:1.1rem;margin:.35rem 0 .2rem}
.monthly-online-entry p{margin:0;color:#52708e;font-size:.9rem}
.monthly-online-badge{display:inline-block;font-size:.72rem;font-weight:750;letter-spacing:.03em;color:#285e9a;text-transform:uppercase}
.monthly-online-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.monthly-gentle-reminder{display:flex;align-items:center;gap:.75rem;margin-top:1rem;padding:.75rem 1rem;border:1px solid #c9dcee;border-radius:12px;background:#f5f9fd;color:#204c78}
.monthly-gentle-reminder span{flex:1;font-weight:600}
@media(max-width:700px){.monthly-online-entry{align-items:stretch;flex-direction:column}.monthly-online-actions .button{flex:1}.monthly-gentle-reminder{flex-wrap:wrap}.monthly-gentle-reminder span{flex-basis:100%}}
