/* V5.4: shared reading design tokens. Do not add book-specific UI colours. */
:root,html[data-theme=light]{--m6-canvas:#f4f4f2;--m6-surface:#fcfcfb;--m6-soft:#f1f2f1;--m6-control:#f6f6f5;--m6-line:#d9dddf;--m6-text:#25303a;--m6-muted:#586574;--m6-accent:#963451;--m6-accent-soft:#f5e9ed;--m6-fill:#963451;--m6-onfill:#fff;--m6-focus:#963451}
html[data-theme=dark]{--m6-canvas:#252b32;--m6-surface:#2b323b;--m6-soft:#303944;--m6-control:#343e49;--m6-line:#45505d;--m6-text:#e2e7ec;--m6-muted:#b8c3ce;--m6-accent:#e1a8ba;--m6-accent-soft:#40343e;--m6-fill:#963451;--m6-onfill:#fff;--m6-focus:#e1a8ba}
html[data-theme=dark][data-color-mode=black]{--m6-canvas:#17191b;--m6-surface:#1d2023;--m6-soft:#24282c;--m6-control:#2a2e32;--m6-line:#3d4349;--m6-text:#e1e5e8;--m6-muted:#b8c0c8;--m6-accent:#e1a8ba;--m6-accent-soft:#3a2d34}
html[data-theme],html[data-theme][data-ai-book],html[data-theme] body.mr-study{--mr-bg:var(--m6-canvas);--mr-surface:var(--m6-surface);--mr-soft:var(--m6-soft);--mr-border:var(--m6-line);--mr-ink:var(--m6-text);--mr-muted:var(--m6-muted);--mr-accent:var(--m6-accent);--mr-accent-soft:var(--m6-accent-soft);--mr-blue:var(--m6-accent);--mr-ring:var(--m6-focus);--brand-accent:var(--m6-accent);--brand-soft:var(--m6-accent-soft);--brand-fill:var(--m6-fill);--m5-book:var(--m6-accent);--m5-book-soft:var(--m6-accent-soft);--theme-bg:var(--m6-canvas);--theme-surface:var(--m6-surface);--theme-subtle:var(--m6-soft);--theme-control:var(--m6-control);--theme-border:var(--m6-line);--theme-border-subtle:var(--m6-line);--theme-border-table:var(--m6-line);--theme-border-control:var(--m6-line);--theme-table-heading:var(--m6-soft);--theme-table-cell:var(--m6-surface);--theme-text:var(--m6-text);--theme-control-text:var(--m6-text);--theme-subtle-text:var(--m6-text);--theme-muted:var(--m6-muted);--theme-note:var(--m6-muted);--theme-fa:var(--m6-text);--theme-focus-border:var(--m6-focus);--theme-hover:var(--m6-soft)}
:root{--m6-border-d3dbe7:#d3dbe7;--m6-border-d3dce7:#d3dce7;--m6-border-d3e0e8:#d3e0e8;--m6-border-d4dce8:#d4dce8;--m6-border-d4dded:#d4dded;--m6-border-d4dfec:#d4dfec;--m6-border-d5dcdb:#d5dcdb;--m6-border-d5deeb:#d5deeb;--m6-border-d5dff0:#d5dff0;--m6-border-d6dfeb:#d6dfeb;--m6-border-d6e0f0:#d6e0f0;--m6-border-d6e0f2:#d6e0f2;--m6-border-d6e4eb:#d6e4eb;--m6-border-d7ddea:#d7ddea;--m6-border-d7deea:#d7deea;--m6-border-d7e1f1:#d7e1f1;--m6-border-d7e4eb:#d7e4eb;--m6-border-d8e0f1:#d8e0f1;--m6-border-d8e1ed:#d8e1ed;--m6-border-d8e1ef:#d8e1ef;--m6-border-d8e1f5:#d8e1f5;--m6-border-d8e3f5:#d8e3f5;--m6-border-d9dce1:#d9dce1;--m6-border-d9e1ec:#d9e1ec;--m6-border-d9e1ed:#d9e1ed;--m6-border-d9e1ef:#d9e1ef;--m6-border-d9e6ed:#d9e6ed;--m6-border-dae2ee:#dae2ee;--m6-border-dae3f2:#dae3f2;--m6-border-dbe3f1:#dbe3f1;--m6-border-dbe3f2:#dbe3f2;--m6-border-dbe4f4:#dbe4f4;--m6-border-dce0e7:#dce0e7;--m6-border-dce2e9:#dce2e9;--m6-border-dce2ee:#dce2ee;--m6-border-dce3ed:#dce3ed;--m6-border-dce3ee:#dce3ee;--m6-border-dce3f2:#dce3f2;--m6-border-dce4e1:#dce4e1;--m6-border-dce4f0:#dce4f0;--m6-border-dce4f1:#dce4f1;--m6-border-dce4f2:#dce4f2;--m6-border-dce4f8:#dce4f8;--m6-border-dce5f1:#dce5f1;--m6-border-dce5f2:#dce5f2;--m6-border-dce5f5:#dce5f5;--m6-border-dce5f6:#dce5f6;--m6-border-dddddd:#dddddd;--m6-border-dde3ed:#dde3ed;--m6-border-dde4ee:#dde4ee;--m6-border-dde5eb:#dde5eb;--m6-border-dde5f0:#dde5f0;--m6-border-dde5f3:#dde5f3;--m6-border-dfe3eb:#dfe3eb;--m6-border-dfe4ec:#dfe4ec;--m6-border-dfe4ed:#dfe4ed;--m6-border-dfe4ee:#dfe4ee;--m6-border-dfe5ee:#dfe5ee;--m6-border-dfe6f0:#dfe6f0;--m6-border-dfe6f2:#dfe6f2;--m6-border-e0e4dd:#e0e4dd;--m6-border-e0e4ec:#e0e4ec;--m6-border-e0e5ed:#e0e5ed;--m6-border-e0e5ef:#e0e5ef;--m6-border-e0e6ee:#e0e6ee;--m6-border-e0e6ef:#e0e6ef;--m6-border-e0e7f2:#e0e7f2;--m6-border-e1e5ed:#e1e5ed;--m6-border-e1e5ee:#e1e5ee;--m6-border-e1e6ef:#e1e6ef;--m6-border-e1e6f0:#e1e6f0;--m6-border-e1e7f0:#e1e7f0;--m6-border-e1e8f2:#e1e8f2;--m6-border-e2e6ef:#e2e6ef;--m6-border-e2e8f2:#e2e8f2;--m6-border-e2e8f3:#e2e8f3;--m6-border-e3e6ed:#e3e6ed;--m6-border-e3e7ef:#e3e7ef;--m6-border-e3e8f0:#e3e8f0;--m6-border-e3e9f4:#e3e9f4;--m6-border-e5eaf2:#e5eaf2;--m6-border-e7eaf0:#e7eaf0;--m6-border-edf0f5:#edf0f5;--m6-border-eef1f6:#eef1f6;--m6-border-eef2fa:#eef2fa;--m6-border-ffffff:#ffffff;--m6-surface-d8edf0:#d8edf0;--m6-surface-d9ecf1:#d9ecf1;--m6-surface-d9efea:#d9efea;--m6-surface-dae9f0:#dae9f0;--m6-surface-dbf2f3:#dbf2f3;--m6-surface-dcecf8:#dcecf8;--m6-surface-ddeaf0:#ddeaf0;--m6-surface-dee5ed:#dee5ed;--m6-surface-e1ebf2:#e1ebf2;--m6-surface-e2e6de:#e2e6de;--m6-surface-e3edf3:#e3edf3;--m6-surface-e3f1f4:#e3f1f4;--m6-surface-e4ecff:#e4ecff;--m6-surface-e5edff:#e5edff;--m6-surface-e6edf5:#e6edf5;--m6-surface-e6edf6:#e6edf6;--m6-surface-e6f1f3:#e6f1f3;--m6-surface-e7eaf1:#e7eaf1;--m6-surface-e7edff:#e7edff;--m6-surface-e7eeff:#e7eeff;--m6-surface-e7efff:#e7efff;--m6-surface-e8efff:#e8efff;--m6-surface-e8f0ee:#e8f0ee;--m6-surface-e8f2f2:#e8f2f2;--m6-surface-e8f3f6:#e8f3f6;--m6-surface-e9eefb:#e9eefb;--m6-surface-e9eff6:#e9eff6;--m6-surface-e9efff:#e9efff;--m6-surface-e9f7fb:#e9f7fb;--m6-surface-eaf0f4:#eaf0f4;--m6-surface-eaf1e8:#eaf1e8;--m6-surface-eaf1f4:#eaf1f4;--m6-surface-eaf1ff:#eaf1ff;--m6-surface-ebf3f4:#ebf3f4;--m6-surface-ecf0ed:#ecf0ed;--m6-surface-ecf2fa:#ecf2fa;--m6-surface-ecf6f0:#ecf6f0;--m6-surface-edf0f5:#edf0f5;--m6-surface-edf2f0:#edf2f0;--m6-surface-edf2fa:#edf2fa;--m6-surface-edf3f6:#edf3f6;--m6-surface-edf3ff:#edf3ff;--m6-surface-edf4f7:#edf4f7;--m6-surface-edf6f0:#edf6f0;--m6-surface-eeefea:#eeefea;--m6-surface-eef2f6:#eef2f6;--m6-surface-eef2f7:#eef2f7;--m6-surface-eef2fa:#eef2fa;--m6-surface-eef2ff:#eef2ff;--m6-surface-eef3ff:#eef3ff;--m6-surface-eef4f5:#eef4f5;--m6-surface-eef4f9:#eef4f9;--m6-surface-eef5fb:#eef5fb;--m6-surface-eef8f7:#eef8f7;--m6-surface-eff4ec:#eff4ec;--m6-surface-eff4f0:#eff4f0;--m6-surface-eff4ff:#eff4ff;--m6-surface-f0f3f4:#f0f3f4;--m6-surface-f0f4f8:#f0f4f8;--m6-surface-f0f6f0:#f0f6f0;--m6-surface-f0f8f4:#f0f8f4;--m6-surface-f0f8f8:#f0f8f8;--m6-surface-f1e9f1:#f1e9f1;--m6-surface-f1f0e9:#f1f0e9;--m6-surface-f1f4f6:#f1f4f6;--m6-surface-f1f4f9:#f1f4f9;--m6-surface-f1f4ff:#f1f4ff;--m6-surface-f1f5ef:#f1f5ef;--m6-surface-f1f5ff:#f1f5ff;--m6-surface-f1f7f3:#f1f7f3;--m6-surface-f1f7fc:#f1f7fc;--m6-surface-f1f9fc:#f1f9fc;--m6-surface-f1fbf5:#f1fbf5;--m6-surface-f2f5ff:#f2f5ff;--m6-surface-f2faf9:#f2faf9;--m6-surface-f2fbf5:#f2fbf5;--m6-surface-f2fbf6:#f2fbf6;--m6-surface-f3f4f7:#f3f4f7;--m6-surface-f3f5f8:#f3f5f8;--m6-surface-f3f6fb:#f3f6fb;--m6-surface-f3f6fc:#f3f6fc;--m6-surface-f3f6fe:#f3f6fe;--m6-surface-f3f7ff:#f3f7ff;--m6-surface-f4f6fa:#f4f6fa;--m6-surface-f4f6fb:#f4f6fb;--m6-surface-f4f7fc:#f4f7fc;--m6-surface-f4f7fd:#f4f7fd;--m6-surface-f4f7ff:#f4f7ff;--m6-surface-f4f8ff:#f4f8ff;--m6-surface-f4fbff:#f4fbff;--m6-surface-f5f4f0:#f5f4f0;--m6-surface-f5f6f9:#f5f6f9;--m6-surface-f5f7fb:#f5f7fb;--m6-surface-f5f7fc:#f5f7fc;--m6-surface-f5f8fc:#f5f8fc;--m6-surface-f5f8ff:#f5f8ff;--m6-surface-f5faf8:#f5faf8;--m6-surface-f6f8fb:#f6f8fb;--m6-surface-f6f8fc:#f6f8fc;--m6-surface-f6f8ff:#f6f8ff;--m6-surface-f7f8fb:#f7f8fb;--m6-surface-f7f9fa:#f7f9fa;--m6-surface-f7f9fc:#f7f9fc;--m6-surface-f7f9fd:#f7f9fd;--m6-surface-f7f9ff:#f7f9ff;--m6-surface-f7fafb:#f7fafb;--m6-surface-f8f8ef:#f8f8ef;--m6-surface-f8f8f5:#f8f8f5;--m6-surface-f8faf1:#f8faf1;--m6-surface-f8fafc:#f8fafc;--m6-surface-f8fafd:#f8fafd;--m6-surface-f8faff:#f8faff;--m6-surface-f8fbff:#f8fbff;--m6-surface-f8fdf9:#f8fdf9;--m6-surface-f9faf6:#f9faf6;--m6-surface-f9fbff:#f9fbff;--m6-surface-faf9f4:#faf9f4;--m6-surface-fafaf4:#fafaf4;--m6-surface-fafbfd:#fafbfd;--m6-surface-fafbfe:#fafbfe;--m6-surface-fafcf9:#fafcf9;--m6-surface-fbebf5:#fbebf5;--m6-surface-fbfaf3:#fbfaf3;--m6-surface-fbfcf9:#fbfcf9;--m6-surface-fbfcff:#fbfcff;--m6-surface-fbfdff:#fbfdff;--m6-surface-fbfffc:#fbfffc;--m6-surface-fcf2f8:#fcf2f8;--m6-surface-fcf9fb:#fcf9fb;--m6-surface-fff7f7:#fff7f7;--m6-surface-fff8f8:#fff8f8;--m6-surface-fffafa:#fffafa;--m6-surface-fffdfd:#fffdfd;--m6-surface-fffef9:#fffef9;--m6-surface-fffefa:#fffefa;--m6-surface-ffffff:#ffffff;}
html[data-theme=dark]{--m6-border-d3dbe7:var(--m6-line);--m6-border-d3dce7:var(--m6-line);--m6-border-d3e0e8:var(--m6-line);--m6-border-d4dce8:var(--m6-line);--m6-border-d4dded:var(--m6-line);--m6-border-d4dfec:var(--m6-line);--m6-border-d5dcdb:var(--m6-line);--m6-border-d5deeb:var(--m6-line);--m6-border-d5dff0:var(--m6-line);--m6-border-d6dfeb:var(--m6-line);--m6-border-d6e0f0:var(--m6-line);--m6-border-d6e0f2:var(--m6-line);--m6-border-d6e4eb:var(--m6-line);--m6-border-d7ddea:var(--m6-line);--m6-border-d7deea:var(--m6-line);--m6-border-d7e1f1:var(--m6-line);--m6-border-d7e4eb:var(--m6-line);--m6-border-d8e0f1:var(--m6-line);--m6-border-d8e1ed:var(--m6-line);--m6-border-d8e1ef:var(--m6-line);--m6-border-d8e1f5:var(--m6-line);--m6-border-d8e3f5:var(--m6-line);--m6-border-d9dce1:var(--m6-line);--m6-border-d9e1ec:var(--m6-line);--m6-border-d9e1ed:var(--m6-line);--m6-border-d9e1ef:var(--m6-line);--m6-border-d9e6ed:var(--m6-line);--m6-border-dae2ee:var(--m6-line);--m6-border-dae3f2:var(--m6-line);--m6-border-dbe3f1:var(--m6-line);--m6-border-dbe3f2:var(--m6-line);--m6-border-dbe4f4:var(--m6-line);--m6-border-dce0e7:var(--m6-line);--m6-border-dce2e9:var(--m6-line);--m6-border-dce2ee:var(--m6-line);--m6-border-dce3ed:var(--m6-line);--m6-border-dce3ee:var(--m6-line);--m6-border-dce3f2:var(--m6-line);--m6-border-dce4e1:var(--m6-line);--m6-border-dce4f0:var(--m6-line);--m6-border-dce4f1:var(--m6-line);--m6-border-dce4f2:var(--m6-line);--m6-border-dce4f8:var(--m6-line);--m6-border-dce5f1:var(--m6-line);--m6-border-dce5f2:var(--m6-line);--m6-border-dce5f5:var(--m6-line);--m6-border-dce5f6:var(--m6-line);--m6-border-dddddd:var(--m6-line);--m6-border-dde3ed:var(--m6-line);--m6-border-dde4ee:var(--m6-line);--m6-border-dde5eb:var(--m6-line);--m6-border-dde5f0:var(--m6-line);--m6-border-dde5f3:var(--m6-line);--m6-border-dfe3eb:var(--m6-line);--m6-border-dfe4ec:var(--m6-line);--m6-border-dfe4ed:var(--m6-line);--m6-border-dfe4ee:var(--m6-line);--m6-border-dfe5ee:var(--m6-line);--m6-border-dfe6f0:var(--m6-line);--m6-border-dfe6f2:var(--m6-line);--m6-border-e0e4dd:var(--m6-line);--m6-border-e0e4ec:var(--m6-line);--m6-border-e0e5ed:var(--m6-line);--m6-border-e0e5ef:var(--m6-line);--m6-border-e0e6ee:var(--m6-line);--m6-border-e0e6ef:var(--m6-line);--m6-border-e0e7f2:var(--m6-line);--m6-border-e1e5ed:var(--m6-line);--m6-border-e1e5ee:var(--m6-line);--m6-border-e1e6ef:var(--m6-line);--m6-border-e1e6f0:var(--m6-line);--m6-border-e1e7f0:var(--m6-line);--m6-border-e1e8f2:var(--m6-line);--m6-border-e2e6ef:var(--m6-line);--m6-border-e2e8f2:var(--m6-line);--m6-border-e2e8f3:var(--m6-line);--m6-border-e3e6ed:var(--m6-line);--m6-border-e3e7ef:var(--m6-line);--m6-border-e3e8f0:var(--m6-line);--m6-border-e3e9f4:var(--m6-line);--m6-border-e5eaf2:var(--m6-line);--m6-border-e7eaf0:var(--m6-line);--m6-border-edf0f5:var(--m6-line);--m6-border-eef1f6:var(--m6-line);--m6-border-eef2fa:var(--m6-line);--m6-border-ffffff:var(--m6-line);--m6-surface-d8edf0:var(--m6-control);--m6-surface-d9ecf1:var(--m6-control);--m6-surface-d9efea:var(--m6-control);--m6-surface-dae9f0:var(--m6-control);--m6-surface-dbf2f3:var(--m6-control);--m6-surface-dcecf8:var(--m6-control);--m6-surface-ddeaf0:var(--m6-control);--m6-surface-dee5ed:var(--m6-control);--m6-surface-e1ebf2:var(--m6-control);--m6-surface-e2e6de:var(--m6-control);--m6-surface-e3edf3:var(--m6-control);--m6-surface-e3f1f4:var(--m6-control);--m6-surface-e4ecff:var(--m6-control);--m6-surface-e5edff:var(--m6-control);--m6-surface-e6edf5:var(--m6-control);--m6-surface-e6edf6:var(--m6-control);--m6-surface-e6f1f3:var(--m6-control);--m6-surface-e7eaf1:var(--m6-soft);--m6-surface-e7edff:var(--m6-soft);--m6-surface-e7eeff:var(--m6-soft);--m6-surface-e7efff:var(--m6-soft);--m6-surface-e8efff:var(--m6-soft);--m6-surface-e8f0ee:var(--m6-soft);--m6-surface-e8f2f2:var(--m6-soft);--m6-surface-e8f3f6:var(--m6-soft);--m6-surface-e9eefb:var(--m6-soft);--m6-surface-e9eff6:var(--m6-soft);--m6-surface-e9efff:var(--m6-soft);--m6-surface-e9f7fb:var(--m6-soft);--m6-surface-eaf0f4:var(--m6-soft);--m6-surface-eaf1e8:var(--m6-soft);--m6-surface-eaf1f4:var(--m6-soft);--m6-surface-eaf1ff:var(--m6-soft);--m6-surface-ebf3f4:var(--m6-soft);--m6-surface-ecf0ed:var(--m6-soft);--m6-surface-ecf2fa:var(--m6-soft);--m6-surface-ecf6f0:var(--m6-soft);--m6-surface-edf0f5:var(--m6-soft);--m6-surface-edf2f0:var(--m6-soft);--m6-surface-edf2fa:var(--m6-soft);--m6-surface-edf3f6:var(--m6-soft);--m6-surface-edf3ff:var(--m6-soft);--m6-surface-edf4f7:var(--m6-soft);--m6-surface-edf6f0:var(--m6-soft);--m6-surface-eeefea:var(--m6-soft);--m6-surface-eef2f6:var(--m6-soft);--m6-surface-eef2f7:var(--m6-soft);--m6-surface-eef2fa:var(--m6-soft);--m6-surface-eef2ff:var(--m6-soft);--m6-surface-eef3ff:var(--m6-soft);--m6-surface-eef4f5:var(--m6-soft);--m6-surface-eef4f9:var(--m6-soft);--m6-surface-eef5fb:var(--m6-soft);--m6-surface-eef8f7:var(--m6-soft);--m6-surface-eff4ec:var(--m6-soft);--m6-surface-eff4f0:var(--m6-soft);--m6-surface-eff4ff:var(--m6-soft);--m6-surface-f0f3f4:var(--m6-soft);--m6-surface-f0f4f8:var(--m6-soft);--m6-surface-f0f6f0:var(--m6-soft);--m6-surface-f0f8f4:var(--m6-soft);--m6-surface-f0f8f8:var(--m6-soft);--m6-surface-f1e9f1:var(--m6-soft);--m6-surface-f1f0e9:var(--m6-soft);--m6-surface-f1f4f6:var(--m6-soft);--m6-surface-f1f4f9:var(--m6-soft);--m6-surface-f1f4ff:var(--m6-soft);--m6-surface-f1f5ef:var(--m6-soft);--m6-surface-f1f5ff:var(--m6-soft);--m6-surface-f1f7f3:var(--m6-soft);--m6-surface-f1f7fc:var(--m6-soft);--m6-surface-f1f9fc:var(--m6-soft);--m6-surface-f1fbf5:var(--m6-soft);--m6-surface-f2f5ff:var(--m6-soft);--m6-surface-f2faf9:var(--m6-soft);--m6-surface-f2fbf5:var(--m6-soft);--m6-surface-f2fbf6:var(--m6-soft);--m6-surface-f3f4f7:var(--m6-soft);--m6-surface-f3f5f8:var(--m6-soft);--m6-surface-f3f6fb:var(--m6-soft);--m6-surface-f3f6fc:var(--m6-soft);--m6-surface-f3f6fe:var(--m6-soft);--m6-surface-f3f7ff:var(--m6-soft);--m6-surface-f4f6fa:var(--m6-soft);--m6-surface-f4f6fb:var(--m6-soft);--m6-surface-f4f7fc:var(--m6-soft);--m6-surface-f4f7fd:var(--m6-soft);--m6-surface-f4f7ff:var(--m6-soft);--m6-surface-f4f8ff:var(--m6-soft);--m6-surface-f4fbff:var(--m6-soft);--m6-surface-f5f4f0:var(--m6-soft);--m6-surface-f5f6f9:var(--m6-soft);--m6-surface-f5f7fb:var(--m6-soft);--m6-surface-f5f7fc:var(--m6-soft);--m6-surface-f5f8fc:var(--m6-soft);--m6-surface-f5f8ff:var(--m6-soft);--m6-surface-f5faf8:var(--m6-soft);--m6-surface-f6f8fb:var(--m6-soft);--m6-surface-f6f8fc:var(--m6-soft);--m6-surface-f6f8ff:var(--m6-soft);--m6-surface-f7f8fb:var(--m6-soft);--m6-surface-f7f9fa:var(--m6-soft);--m6-surface-f7f9fc:var(--m6-soft);--m6-surface-f7f9fd:var(--m6-soft);--m6-surface-f7f9ff:var(--m6-soft);--m6-surface-f7fafb:var(--m6-soft);--m6-surface-f8f8ef:var(--m6-soft);--m6-surface-f8f8f5:var(--m6-soft);--m6-surface-f8faf1:var(--m6-soft);--m6-surface-f8fafc:var(--m6-surface);--m6-surface-f8fafd:var(--m6-surface);--m6-surface-f8faff:var(--m6-surface);--m6-surface-f8fbff:var(--m6-surface);--m6-surface-f8fdf9:var(--m6-surface);--m6-surface-f9faf6:var(--m6-soft);--m6-surface-f9fbff:var(--m6-surface);--m6-surface-faf9f4:var(--m6-soft);--m6-surface-fafaf4:var(--m6-soft);--m6-surface-fafbfd:var(--m6-surface);--m6-surface-fafbfe:var(--m6-surface);--m6-surface-fafcf9:var(--m6-surface);--m6-surface-fbebf5:var(--m6-soft);--m6-surface-fbfaf3:var(--m6-soft);--m6-surface-fbfcf9:var(--m6-surface);--m6-surface-fbfcff:var(--m6-surface);--m6-surface-fbfdff:var(--m6-surface);--m6-surface-fbfffc:var(--m6-surface);--m6-surface-fcf2f8:var(--m6-soft);--m6-surface-fcf9fb:var(--m6-surface);--m6-surface-fff7f7:var(--m6-soft);--m6-surface-fff8f8:var(--m6-surface);--m6-surface-fffafa:var(--m6-surface);--m6-surface-fffdfd:var(--m6-surface);--m6-surface-fffef9:var(--m6-surface);--m6-surface-fffefa:var(--m6-surface);--m6-surface-ffffff:var(--m6-surface);}

/* Shared surface, type and table rules for all six books. */
html[data-theme] body:is(.mr-study,.mr-library){background:var(--m6-canvas)!important;color:var(--m6-text)!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.grammar-tables25,.grammar-lesson26,.grammar-part26,.grammar-rule26,.grammar-table-intro27,.gsection23,.worked25,.gsum21,.sr-paper,.sr-source-group,.sr-reference-block,.reading-segment26,.grammar-example26,.original-instruction37,.original-question37,.reading-text25,.reading-shell26,.b12-grammar-rules article){background:var(--m6-surface)!important;color:var(--m6-text)!important;border-color:var(--m6-line)!important;box-shadow:none!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-part26,.gsection23){border-radius:9px!important;padding:clamp(12px,1.8vw,20px)!important;margin:12px 0!important;min-width:0!important;max-width:100%!important}
html[data-theme] body.mr-study :is(.grammar-rule26,.grammar-reference27>.grammar-rule26){background:var(--m6-soft)!important;color:var(--m6-text)!important;border:0!important;border-radius:5px!important;padding:8px 12px!important;font-weight:600!important;font-family:var(--mr-latin)!important}
html[data-theme] body.mr-study .grammar-tables25{padding:0!important;overflow-x:auto!important;max-width:100%!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) table{width:100%!important;max-width:100%!important;min-width:0!important;margin:8px 0!important;table-layout:auto!important;border-collapse:collapse!important;border:1px solid var(--m6-line)!important;background:var(--m6-surface)!important;font-size:16px!important;line-height:1.65!important;box-shadow:none!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) :is(td,th){padding:9px 12px!important;border-color:var(--m6-line)!important;background:var(--m6-surface)!important;color:var(--m6-text)!important;white-space:normal!important;overflow-wrap:break-word!important;vertical-align:top!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) th{background:var(--m6-soft)!important;font-weight:600!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) tbody tr:nth-child(even) td{background:var(--m6-soft)!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) [lang=fa]{font-family:var(--fa-reading)!important;line-height:1.85!important}
html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) [lang=de]{font-family:var(--mr-latin)!important}
html[data-theme] body.mr-study :is(.reading-german26,.example-de26,.grammar-rule26,.grammar-fa26,.grammar-intro26,.grammar-table-intro27){font-size:var(--m6-copy,16px)!important;line-height:1.75!important;overflow-wrap:break-word!important}
html[data-theme] body.mr-study :is(.reading-german26,.example-de26,.reading-word26){font-family:var(--mr-latin)!important;font-weight:400!important}
html[data-theme] body.mr-study :is(.reading-translation26,.example-fa26,.grammar-table-intro27,.grammar-fa26,.grammar-intro26,.card .tr,.card .fa){font-family:var(--fa-reading)!important;font-size:var(--m6-translation,15px)!important;font-weight:400!important;line-height:1.9!important;color:var(--m6-muted)!important}
html[data-theme] body.mr-study :is(.reading-translation26,.example-fa26){background:transparent!important;border-color:var(--m6-line)!important}
html[data-theme] body.mr-study .grammar-example26{padding:9px 12px!important;margin:7px 0!important;background:var(--m6-soft)!important}
html[data-theme] body.mr-study :is(.grammar-part26 h4,.grammar-lesson26 h3,.grammar-table26>h4){font-weight:600!important;line-height:1.65!important;color:var(--m6-text)!important}
html[data-theme] body.mr-study :is(.sr-paper,.reading-text25,.reading-shell26,.sr-source-group){border-color:var(--m6-line)!important;min-width:0!important}
html[data-theme] body.mr-study .sr-paper{padding:clamp(10px,2vw,24px)!important}
html[data-theme] body.mr-study .reading-segment26:not(.v53-choice-row){background:var(--m6-soft)!important;border-radius:6px!important;padding:10px 12px!important;margin:8px 0!important}
html[data-theme] body.mr-study .v53-choice-paper .v53-choice-row{background:transparent!important}
html[data-theme] body :is(button,input,textarea,select,summary,a):focus-visible{outline:2px solid var(--m6-focus)!important;outline-offset:2px!important}
html[data-theme] body :is(button,input,textarea,select){accent-color:var(--m6-fill)}
/* Action controls that previously used a separate blue or green accent. */
html[data-theme] body.mr-study :is(#addWordBtn,#addCustomWord,#customWordBtn,.add-word,.add-word-btn,.vocab-add-btn,.b12-add-word,.b12-add-word-btn,.reading-add26,.grammar-add26,button.primary,button.btn-primary,.primary-btn):not(.known):not(.review){background:var(--m6-fill)!important;border-color:var(--m6-fill)!important;color:var(--m6-onfill)!important;box-shadow:none!important}
html[data-theme] body.mr-study :is(.top,#menschen-workspace){background:var(--m6-surface)!important;border-color:var(--m6-line)!important}
html[data-theme] body.mr-study :is(.mw-sub,.mw-groups){scrollbar-width:thin;scrollbar-color:var(--m6-line) transparent}
html[data-theme] body.mr-study :is(.m-book-audio-icon,.m5-word-audio){color:var(--m6-accent)!important}
html[data-theme] body.mr-study :is(.card,.m5-picture-card,.grammar-reference27,.sr-paper){box-shadow:none!important}
@media(max-width:600px){html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-part26,.gsection23){padding:10px!important}html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) :is(td,th){padding:7px 8px!important;font-size:14px!important}html[data-theme] body.mr-study :is(.reading-german26,.example-de26,.grammar-fa26,.grammar-intro26){font-size:15px!important}html[data-theme] body.mr-study :is(.reading-translation26,.example-fa26){font-size:14px!important}html[data-theme] body.mr-study .reading-segment26:not(.v53-choice-row){padding:8px!important}}
@media(prefers-reduced-motion:reduce){html body *{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Regression results: real templates with previously unthemed labels and controls. */
html[data-theme] body.mr-study #grammarTables26 .grammar-reference27 .gtable23{display:table!important;width:min(100%,760px)!important;max-width:100%!important;margin:10px 0 0!important}
html[data-theme] body.mr-study #grammarTables26 .grammar-reference27 .gtable23 :is(td,th){border:1px solid var(--m6-line)!important;text-align:start}
html[data-theme] body.mr-study #grammarTables26 .grammar-reference27 .gtable23 .fa23{text-align:right}
html[data-theme] body.mr-study :is(.bookpage.overview23,.bookpage,.overview-book-page){background:var(--m6-surface)!important;border-color:var(--m6-line)!important;box-shadow:none!important}
html[data-theme] body.mr-study :is(.book-fidelity-letters small,.book-fidelity-item,.listening-example31,.sr-fa-marker,.sr-marker .reading-word26,.sr-page-title,.muted25){color:var(--m6-muted)!important}
html[data-theme] body.mr-study :is(.sr-marker,.sr-fa-marker){color:var(--m6-accent)!important}
html[data-theme] body.mr-study .sr-page-title{font-weight:600!important;color:var(--m6-text)!important}
html[data-theme] body.mr-study :is(.primary25,#openReading,.listening-actions31 button:first-child){background:var(--m6-fill)!important;border-color:var(--m6-fill)!important;color:var(--m6-onfill)!important;box-shadow:none!important}
html[data-theme] body.mr-study :is(.page-tabs25,.page-buttons,.b12-page-buttons) button{background:var(--m6-control)!important;color:var(--m6-text)!important;border-color:var(--m6-line)!important;box-shadow:none!important}
html[data-theme] body.mr-study :is(.page-tabs25,.page-buttons,.b12-page-buttons) button:is(.active,[aria-selected=true],[aria-pressed=true],[aria-current=page]){background:var(--m6-accent-soft)!important;color:var(--m6-accent)!important;border-color:var(--m6-accent)!important}
html[data-theme=dark] body.mr-study :is(.page-tabs25,.page-buttons,.b12-page-buttons) button.active:not(.state-known):not(.state-review):not(.active-known):not(.active-review){background:var(--m6-accent-soft)!important;color:var(--m6-accent)!important;border-color:var(--m6-accent)!important}
html[data-theme] body.mr-study :is(#readingPane25,#readingPane,#b12Main,main) :is(.page-tabs25,.page-buttons,.b12-page-buttons) button:is(.active,[aria-selected=true],[aria-pressed=true],[aria-current=page]){background:var(--m6-accent-soft)!important;color:var(--m6-accent)!important;border-color:var(--m6-accent)!important}
html[data-theme] body.mr-study .listening-source-cards31 article{background:var(--m6-surface)!important;color:var(--m6-text)!important;border-color:var(--m6-line)!important;box-shadow:none!important}
html[data-theme] body.mr-study .book-tv-caption38{background:var(--m6-accent-soft)!important;color:var(--m6-accent)!important}
html[data-theme] body.mr-study #b12Main .b12-question-fa,html[data-theme] body.mr-study .sr-line-text .reading-word26{color:var(--m6-muted)!important}
html[data-theme=light] body.mr-study #bilder .m-bild-der{color:#2058a0!important}html[data-theme=light] body.mr-study #bilder .m-bild-die{color:#a52d60!important}html[data-theme=light] body.mr-study #bilder .m-bild-das{color:#166647!important}
html[data-theme=dark] body.mr-study #bilder .m-bild-der{color:#a8c8f0!important}html[data-theme=dark] body.mr-study #bilder .m-bild-die{color:#f1a8c1!important}html[data-theme=dark] body.mr-study #bilder .m-bild-das{color:#95d6b6!important}
html[data-theme] body.mr-study :is(.book-yellow-tip38,.book-yellow-tip38 strong,.book-yellow-tip38 p){background:var(--m6-soft)!important;color:var(--m6-text)!important;border-color:var(--m6-line)!important}
html[data-theme] body.mr-study .book-yellow-tip38 strong{color:var(--m6-accent)!important}
/* Keep existing vocabulary states, place the speech target on the same line as the word. */
html[data-theme] body.mr-study #vocab .vhead21{grid-template-columns: auto minmax(0,1fr) 32px!important;column-gap:7px!important;row-gap:4px!important;align-items:center!important}
html[data-theme] body.mr-study #vocab .vhead21:not(:has(>.icon23,>[data-word-icon])){grid-template-columns:minmax(0,1fr) 32px!important}
html[data-theme] body.mr-study #vocab .vhead21>.vword21{grid-column:2!important;grid-row:1!important}
html[data-theme] body.mr-study #vocab .vhead21:not(:has(>.icon23,>[data-word-icon]))>.vword21{grid-column:1!important}
html[data-theme] body.mr-study #vocab .vhead21>.m6-word-speech{grid-column:3!important;grid-row:1!important;justify-self:center!important;align-self:start!important}
html[data-theme] body.mr-study #vocab .vhead21:not(:has(>.icon23,>[data-word-icon]))>.m6-word-speech{grid-column:2!important}
html[data-theme] body.mr-study #vocab .vhead21>.vstatus21{grid-column:2/-1!important;grid-row:2!important}
html[data-theme] body.mr-study #vocab .vhead21:not(:has(>.icon23,>[data-word-icon]))>.vstatus21{grid-column:1/-1!important}
html[data-theme] body.mr-study .vocab-heading.m6-inline-word{display:flex!important;align-items:flex-start!important;gap:7px!important;direction:ltr!important;min-width:0}
html[data-theme] body.mr-study .vocab-heading.m6-inline-word>.vword21{flex:1;min-width:0;overflow-wrap:anywhere}
html[data-theme] body.mr-study .m6-word-speech{font-size:0!important;width:32px!important;min-width:32px!important;height:34px!important;min-height:34px!important;padding:0!important;border:1px solid transparent!important;background:transparent!important;box-shadow:none!important;color:var(--m6-accent)!important;display:inline-grid!important;place-items:center!important;flex:0 0 32px!important}
html[data-theme] body.mr-study .m6-word-speech::before{content:'';width:18px;height:18px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M15 9a4 4 0 0 1 0 6M18 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E") center/contain no-repeat}
html[data-theme] body.mr-study .m6-word-speech:hover{background:var(--m6-accent-soft)!important;border-color:var(--m6-line)!important}
html[data-theme] body.mr-study .m6-word-speech:is([aria-pressed=true],.reading-playing28)::before{mask:none;width:11px;height:11px;border-radius:2px}
/* Respect the existing A+/A− preference instead of locking lesson typography to pixels. */
html[data-theme] body.mr-study{--m6-copy:max(14px,calc(var(--fs,18px) - 2px));--m6-translation:max(14px,calc(var(--fs,18px) - 3px))}
html[data-theme] body.mr-study :is(.reading-german26,.example-de26,.grammar-rule26,.grammar-fa26,.grammar-intro26,.grammar-table-intro27,.grammar-reference27 table,.grammar-table26 table,.grammar-tables25 table){font-size:var(--m6-copy)!important}
html[data-theme] body.mr-study :is(.reading-translation26,.example-fa26,.card .tr,.card .fa,.b12-line-fa){font-size:var(--m6-translation)!important}
html[data-theme] body.mr-study article[data-source-layout27="a12-13-1"] .v53-choice-paper .v53-choice-row>.reading-german26{font-size:var(--m6-copy)!important}
html[data-theme] body.mr-study article[data-source-layout27="a12-13-1"] .v53-choice-paper .v53-choice-row>.reading-translation26{font-size:var(--m6-translation)!important}
@media(max-width:600px){html[data-theme] body.mr-study :is(.grammar-reference27,.grammar-table26,.gsection23,.grammar-tables25) :is(td,th){font-size:max(14px,calc(var(--fs,18px) - 4px))!important}}

html[data-theme] body.mr-study :is(.grammar-fa26,.grammar-intro26,.grammar-table-intro27,.card .tr,.card .fa){font-size:var(--m6-translation)!important}

html[data-theme] body.mr-study #vocab .vhead21>:is(.icon23,[data-word-icon]){grid-column:1!important;grid-row:1 / span 2!important;align-self:start!important;position:static!important}
