/* MISIARIUM 11.9.80 – SINGLE student lesson interaction contract.
 * First define surface semantics, then link/button variants. Always last stylesheet.
 * Never reset the dark world theme. Keyboard and mobile are first-class.
 */
body.magic90-lesson .m-ui-light {
 --m-ui-link:#07513f;
 --m-ui-link-hover:#04382e;
 --m-ui-focus:#924600;
 color-scheme:light;
}
/* Unclassified text links on explicitly bright lesson surfaces.
   WebKit text fill must match color: legacy dark-theme styles set it separately. */
body.magic90-lesson .m-ui-light :is(p,li) > a:not([class]),
body.magic90-lesson .m-ui-light :is(p,li) > a:not([class]):visited,
body.magic90-lesson .m-ui-light a.m11979-inline-jump,
body.magic90-lesson .m-ui-light a.m11979-inline-jump:visited,
body.magic90-lesson .m-ui-light a.m-ui-text-link,
body.magic90-lesson .m-ui-light a.m-ui-text-link:visited {
 color:var(--m-ui-link)!important;
 -webkit-text-fill-color:var(--m-ui-link)!important;
 font-weight:750!important;
 text-decoration:underline!important;
 text-decoration-thickness:2px!important;
 text-underline-offset:3px!important;
}
body.magic90-lesson .m-ui-light :is(p,li) > a:not([class]):hover,
body.magic90-lesson .m-ui-light a.m11979-inline-jump:hover,
body.magic90-lesson .m-ui-light a.m-ui-text-link:hover {
 color:var(--m-ui-link-hover)!important;
 -webkit-text-fill-color:var(--m-ui-link-hover)!important;
 text-decoration-thickness:3px!important;
}
/* High-contrast action controls. Class-based contract makes color independent
   of link states, theme inheritance, specificity and nested card text. */
body.magic90-lesson .m-ui-action-row {
 display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;margin-top:12px;
}
body.magic90-lesson .m-ui-light a.m-ui-action,
body.magic90-lesson .m-ui-light a.m-ui-action:visited {
 display:inline-flex;align-items:center;justify-content:center;flex:0 1 auto;
 min-height:48px;min-width:180px;padding:12px 17px;border-radius:12px;
 border:2px solid transparent;text-align:center;text-decoration:none!important;
 font-size:1rem;font-weight:850!important;line-height:1.35;
 max-width:100%;overflow-wrap:anywhere;white-space:normal;
 box-shadow:0 2px 6px rgba(13,40,44,.12);
 transition:background-color .15s, border-color .15s, box-shadow .15s;
}
body.magic90-lesson .m-ui-light a.m-ui-action--primary,
body.magic90-lesson .m-ui-light a.m-ui-action--primary:visited {
 background:#075b45!important;border-color:#064332!important;
 color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
}
body.magic90-lesson .m-ui-light a.m-ui-action--primary:hover {
 background:#034331!important;color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
}
body.magic90-lesson .m-ui-light a.m-ui-action--secondary,
body.magic90-lesson .m-ui-light a.m-ui-action--secondary:visited {
 background:#e8f4ff!important;border-color:#1b5372!important;
 color:#103e58!important;-webkit-text-fill-color:#103e58!important;
}
body.magic90-lesson .m-ui-light a.m-ui-action--secondary:hover {
 background:#d0e9fb!important;color:#0c334b!important;
 -webkit-text-fill-color:#0c334b!important;
}
body.magic90-lesson .m-ui-light a:focus-visible,
body.magic90-lesson .m-ui-light button:focus-visible,
body.magic90-lesson .m-ui-light summary:focus-visible {
 outline:3px solid var(--m-ui-focus)!important;
 outline-offset:3px!important;
}
/* Keep dark panels' text independent; tokens only apply inside marked light surfaces. */
body.magic90-lesson :is(#home-help11934,#student-submission,#submission-file) {
 scroll-margin-top:110px;
}
@media (max-width:680px) {
 body.magic90-lesson .m-ui-action-row {flex-direction:column;gap:9px}
 body.magic90-lesson .m-ui-light a.m-ui-action {width:100%;min-width:0;min-height:48px}
}
@media (prefers-reduced-motion:reduce) {
 body.magic90-lesson .m-ui-light a.m-ui-action {transition:none!important}
}
@media print {
 body.magic90-lesson .m-ui-light a.m-ui-action,
 body.magic90-lesson .m-ui-light a.m-ui-action:visited {
 background:#ffffff!important;color:#111111!important;-webkit-text-fill-color:#111111!important;
 border:2px solid #222!important;box-shadow:none!important;
 }
}
