/* Common envelope, based on the three original tools. Operational styles stay local. */
:root { color-scheme: light dark; --bg:#f4f5f7; --panel:#fff; --text:#202124; --muted:#687078; --border:#d7dbe0; --primary:#2271b1; --primary-hover:#135e96; --success:#198754; --danger:#b42318; }
@media (prefers-color-scheme:dark) { :root { --bg:#17191c; --panel:#22252a; --text:#f2f3f5; --muted:#adb3ba; --border:#41464d; --primary:#72aee6; --primary-hover:#9ec5e8; --success:#58c98d; --danger:#ff8a80; } }
body { margin:0; padding:24px; font-family:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--bg); color:var(--text); }
.app,.mrc-tool-header,.mrc-tool-afterword { width:100%; max-width:920px; margin-left:auto; margin-right:auto; }
.app h1 { margin:0 0 8px; font-size:28px; line-height:1.2; letter-spacing:normal; }
.app .intro { margin:0 0 18px; color:var(--muted); line-height:1.5; }
.mrc-tool-header { display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; margin-bottom:22px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.mrc-tool-header .mrc-tools-nav { display:flex; flex:1 1 600px; min-width:0; width:auto; gap:8px; align-items:center; margin:0; padding:0; border:0; overflow-x:auto; }
.mrc-tools-nav a { flex:0 0 auto; display:inline-flex; align-items:center; min-height:38px; padding:7px 11px; border:1px solid var(--border); border-radius:7px; color:var(--text); background:var(--panel); text-decoration:none; font-size:14px; font-weight:600; white-space:nowrap; }
.mrc-tools-nav a:hover { border-color:var(--primary); }
.mrc-tools-nav a[aria-current="page"] { border-color:var(--primary); background:var(--primary); color:#fff; }
.mrc-tool-language { display:flex; align-items:center; gap:10px; font-size:14px; line-height:20px; }
.mrc-tool-language a,.mrc-tool-language .mrc-language-separator { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:7px 0; line-height:20px; }
.mrc-tool-language a { color:inherit; font-weight:600; text-decoration:none; }
.mrc-tool-language a[aria-current="page"] { font-weight:600; text-decoration:underline; text-underline-offset:4px; text-decoration-thickness:1px; }
.mrc-tool-header a:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.mrc-tool-afterword { margin-top:72px; }
.mrc-tool-afterword .mrc-tool-specific { font-size:14px; color:inherit; }
.mrc-tool-afterword .mrc-tool-specific h2 { font-size:18px; }
@media(max-width:700px) { body { padding:14px; } .mrc-tool-afterword { margin-top:48px; } }

/* Catalogue navigation scales independently of tool count. */
.mrc-tool-header .mrc-tools-nav{flex:1 1 auto;flex-wrap:wrap;gap:12px 22px;overflow:visible;width:auto}
.mrc-tools-nav a{border:0;border-radius:0;background:transparent;padding:6px 0;color:inherit;font-weight:500}
.mrc-tools-nav a[aria-current="page"]{background:transparent;color:inherit;text-decoration:underline;text-underline-offset:5px}
.mrc-tool-language{flex:0 0 auto;align-items:center;gap:10px;line-height:20px}
.mrc-tool-language a,.mrc-tool-language .mrc-language-separator{display:flex;align-items:center;padding:0;min-height:44px;line-height:20px;box-sizing:border-box}
.mrc-tool-language a[aria-current="page"]{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
.mrc-nav-short{display:none}
@media(max-width:600px){
 /* Keep Tool Flows visible: wrap links rather than crowd the language switcher. */
 .mrc-tool-header{flex-wrap:nowrap;align-items:flex-start;gap:12px}
 .mrc-tool-header .mrc-tools-nav{flex:1 1 auto;flex-wrap:wrap;gap:8px clamp(10px,3vw,18px)}
 .mrc-tools-nav a{min-height:44px}
 .mrc-tools-nav .mrc-nav-full{display:none}
 .mrc-tools-nav .mrc-nav-short{display:inline}
 .mrc-tool-language{margin-left:auto;gap:6px}
 .mrc-tool-language a{min-width:24px}
}

/* Shared editorial sections use Manrope, including dynamically inserted donations. */
.mrc-related,.mrc-tool-feedback,.mrc-tool-afterword,.mrc-donation{font-family:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}

/* Keep support cards aligned with the content column, including before a result. */
.mrc-donation{margin-left:max(0px, calc((100% - 920px)/2))!important;margin-right:0!important;max-width:620px!important;width:100%!important}
