/* Learning & Research Studio 4.0 — scoped to preserve the existing 5-section shell */
#mrr40Hub{color:#283e34;max-width:1320px;margin:auto}#mrr40Hub *{box-sizing:border-box}
.m40{background:#faf8f2;border:1px solid #e0dccd;border-radius:21px;padding:clamp(16px,3vw,32px);box-shadow:0 12px 40px #2b41390b}
.m40-head{display:flex;align-items:start;justify-content:space-between;gap:18px;margin-bottom:22px}.m40-head h2{font:normal clamp(26px,3vw,39px)/1.16 Georgia,serif;color:#254638;margin:7px 0}.m40-head p,.m40-panel>p{color:#68786f;line-height:1.65;margin:8px 0 17px}.m40-eyebrow{font-size:10px;color:#a07e51;letter-spacing:2.2px;font-weight:800;text-transform:uppercase}.m40-sync{font-size:12px;padding:8px 12px;border-radius:20px;background:#e9efe8;color:#315b46;white-space:nowrap}
.m40-tabs{display:flex;gap:7px;overflow-x:auto;padding:2px 0 13px;margin-bottom:18px;scrollbar-width:thin;border-bottom:1px solid #e8e4d8}.m40-tabs button{flex:none;white-space:nowrap;border:1px solid #dedacc;background:white;border-radius:24px;padding:9px 13px;color:#516759;font-size:12px;font-weight:700;cursor:pointer}.m40-tabs button[aria-current=page]{background:#244e3b;border-color:#244e3b;color:white}
.m40-hero{display:grid;grid-template-columns:1fr 190px;gap:20px;background:linear-gradient(115deg,#153c31,#2d5b45);color:#fffbea;padding:32px;border-radius:18px;min-height:210px;align-items:center}.m40-hero h3{font:normal clamp(24px,2.8vw,39px)/1.14 Georgia,serif;max-width:500px;margin:8px 0 15px}.m40-hero p{color:#cee0d2;max-width:510px}.m40-hero-art{font-size:27px;text-align:center;color:#e0c18d}.m40-hero-art span{font-size:90px;display:block;filter:drop-shadow(0 12px 10px #102e27)}.m40-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}.m40 button,.m40-file{border:1px solid #cbd9cf;background:#e9efe8;color:#244a38;border-radius:9px;padding:9px 13px;font-size:12px;font-weight:750;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-align:center}.m40 button:hover,.m40-file:hover{background:#dce7db}.m40 button:disabled{opacity:.5;cursor:not-allowed}.m40 .m40-outline{background:#fff;border-color:#ded9cc}.m40-hero button{background:#ead4a9;border-color:#ead4a9;color:#20362b}.m40-hero button.m40-outline{background:transparent;border-color:#90a696;color:#f0ead9}
.m40-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:17px 0}.m40-stats article{border:1px solid #e4e1d6;background:#fffefa;border-radius:12px;padding:17px}.m40-stats small{display:block;font-size:9px;letter-spacing:1.4px;color:#8b8d7d;font-weight:800}.m40-stats strong{font:normal 29px Georgia,serif;display:block;margin:5px 0;color:#2b5841}.m40-stats span{color:#7c897e;font-size:11px}.m40-stats.mini{grid-template-columns:repeat(2,minmax(0,1fr))}
.m40-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;margin:16px 0}.m40-panel{border:1px solid #e4e1d6;border-radius:14px;background:#fffefa;padding:clamp(15px,2.4vw,24px);margin:14px 0}.m40-grid .m40-panel{margin:0}.m40-panel h3{font:normal 25px Georgia,serif;color:#254c3a;margin:0 0 9px}.m40-panel h4{font:normal 21px Georgia,serif;color:#234432;margin:16px 0}.m40-form{display:grid;gap:11px;margin:15px 0}.m40-form label{display:grid;gap:5px;font-size:12px;color:#526b5c;font-weight:650}.m40-form input:not([type=checkbox]),.m40-form textarea,.m40-form select,.m40-panel>input{background:#fff;color:#283b31;border:1px solid #d5d9ce;border-radius:9px;padding:10px 12px;font:inherit;width:100%;min-width:0}.m40-form textarea{resize:vertical;line-height:1.55}.m40-form input:focus-visible,.m40-form textarea:focus-visible,.m40-form select:focus-visible,.m40 button:focus-visible,.m40-tabs button:focus-visible{outline:3px solid #b69969;outline-offset:2px}.m40-form .m40-check{display:flex;gap:8px;align-items:start;line-height:1.4;font-weight:400}.m40-check input{margin-top:3px;accent-color:#276546}.m40-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.m40-small{font-size:12px;line-height:1.55;color:#758579}.m40 a{color:#26664c;text-decoration:underline;text-underline-offset:3px}.m40-line{padding:13px 0;border-bottom:1px solid #eae8de;display:flex;gap:15px;justify-content:space-between;align-items:start}.m40-line strong{font-size:14px;display:block;line-height:1.4}.m40-line small{display:block;margin:5px 0;color:#819084;font-size:11px}.m40-line p{font-size:12px;color:#657568;line-height:1.5;overflow-wrap:anywhere}.m40-line>div:first-child{min-width:0;flex:1}.m40-line .m40-actions{margin:0}.m40-line button{flex:none}.m40-empty{font:italic 15px Georgia,serif;color:#829086;margin:18px 0}.m40-answer{white-space:pre-wrap;background:#edf4ed;border:1px solid #d4e4d8;padding:18px;border-radius:13px;line-height:1.7;margin:15px 0;color:#345743}.m40-flashcard{background:#f8f3e7;border:1px solid #e7d5b7;border-radius:15px;padding:23px;margin:17px 0;min-height:180px}.m40-flashcard small{color:#94754e}.m40-flashcard h4{font:normal 23px/1.35 Georgia,serif}.m40-flashcard p{border-top:1px solid #e7ddc9;padding-top:16px;white-space:pre-wrap;line-height:1.65}.m40-list{max-height:520px;overflow:auto}.m40-messages{min-height:150px;max-height:350px;overflow:auto;background:#f6f6ee;border-radius:10px;padding:12px}.m40-messages article{border-bottom:1px solid #dcded3;padding:9px 0}.m40-messages small{font-size:11px;color:#829184}.m40-messages p{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.m40-graph{display:block;width:100%;max-height:350px;border-radius:10px;background:#f5f7ef}.m40-shortcut{padding:12px 17px;border-radius:12px;border:1px solid #9ebaaa;background:#e9f0e5;color:#24503b;font-weight:750;cursor:pointer;margin:0 0 14px}
@media(max-width:850px){.m40-grid{grid-template-columns:1fr}.m40-hero{grid-template-columns:1fr}.m40-hero-art{display:none}.m40-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.m40-head{flex-direction:column}.m40-sync{white-space:normal}}
@media(max-width:520px){.m40{padding:13px;border-radius:12px}.m40-hero{padding:22px}.m40-pair{grid-template-columns:1fr}.m40-line{flex-direction:column}.m40-line .m40-actions{width:100%}.m40-line button{white-space:normal}.m40-tabs{margin-right:-10px}.m40-stats article{padding:12px}}
@media(prefers-reduced-motion:reduce){.m40 *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
