/* Only legacy tool routes opt into this scope; other public pages retain their existing appearance. */
html.xunl-legacy-tool .legacy-tool-preferences{max-width:1160px;margin:12px auto;display:flex;justify-content:flex-end;align-items:center;gap:16px;padding:0 16px;color:var(--ink);font-size:13px}
html.xunl-legacy-tool .legacy-tool-preferences[hidden]{display:none}
html.xunl-legacy-tool .legacy-tool-preferences label{display:flex;align-items:center;gap:8px;margin:0}
html.xunl-legacy-tool .legacy-tool-preferences select{border:1px solid var(--line-2);border-radius:8px;background:var(--card);color:var(--ink);padding:5px 9px;font:inherit}
html.xunl-legacy-tool[data-xunl-theme="dark"]{--ink:#e6edf7;--ink-2:#c2d0e2;--muted:#94a5bb;--line:#26364c;--line-2:#38506d;--bg:#0b1220;--card:#121e30;--brand:#85aaff;--brand-2:#b0c8ff;--brand-soft:#1b3156;--ok:#7be5a8;--ok-soft:#133d30;--warn:#ffd08c;--warn-soft:#493419;--bad:#ffadb9;--bad-soft:#47232f;--bs-body-bg:#121e30;--bs-body-color:#e6edf7;--bs-secondary-color:#94a5bb;--bs-border-color:#38506d;color-scheme:dark}
html.xunl-legacy-tool[data-xunl-theme="dark"] body,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .card,html.xunl-legacy-tool[data-xunl-theme="dark"] .pnav,html.xunl-legacy-tool[data-xunl-theme="dark"] .pnav .dd-panel,html.xunl-legacy-tool[data-xunl-theme="dark"] .pfoot{background:var(--card);color:var(--ink);border-color:var(--line)}
html.xunl-legacy-tool[data-xunl-theme="dark"] body{background:var(--bg)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-hero{background:linear-gradient(180deg,#142238,#101b2d)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .form-control,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .form-select,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .accordion-button,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .accordion-body{background:var(--bg);color:var(--ink);border-color:var(--line-2)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .table{--bs-table-bg:var(--card);--bs-table-color:var(--ink);--bs-table-hover-bg:#1c304a;--bs-table-hover-color:var(--ink);--bs-table-border-color:var(--line)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .table th,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .card-header,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body pre,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body code,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .btn-outline-secondary,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .btn-outline-primary{background:#17283f;color:var(--ink)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-upsell{background:linear-gradient(120deg,#193253,#2d2348);border-color:var(--line-2)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .text-secondary,html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .text-muted{color:var(--muted)!important}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .alert-info{background:var(--brand-soft);color:var(--ink);border-color:var(--line-2)}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .alert-success{background:var(--ok-soft);color:var(--ok);border-color:#265846}
html.xunl-legacy-tool[data-xunl-theme="dark"] .tool-body .alert-danger{background:var(--bad-soft);color:var(--bad);border-color:#744155}
html.xunl-legacy-tool[data-xunl-theme="dark"] .xl-chat .xl-bubble,html.xunl-legacy-tool[data-xunl-theme="dark"] .xl-composer,html.xunl-legacy-tool[data-xunl-theme="dark"] .xl-hero,html.xunl-legacy-tool[data-xunl-theme="dark"] .xl-suggest button{background:var(--card);color:var(--ink);border-color:var(--line-2)}
@media(max-width:600px){html.xunl-legacy-tool .legacy-tool-preferences{flex-wrap:wrap;gap:12px}html.xunl-legacy-tool .tool-title h1{flex-wrap:wrap}html.xunl-legacy-tool .tool-body{min-width:0;overflow-wrap:anywhere}}

/* Reserve the already opted-in preference bar before DOMContentLoaded to avoid a layout jump. */
html.xunl-legacy-tool .legacy-tool-preferences{font-size:14px;min-height:44px}
html.xunl-legacy-tool .legacy-tool-preferences[hidden]{display:flex!important;visibility:hidden}
html.xunl-legacy-tool .legacy-tool-preferences select{font-size:16px;min-height:44px;padding:8px 10px}
html.xunl-legacy-tool .legacy-tool-preferences>a{display:inline-flex;align-items:center;min-height:44px}
html.xunl-legacy-tool .tool-body{font-size:16px;line-height:1.7;width:calc(100% - 32px);min-width:0;overflow-wrap:anywhere}
html.xunl-legacy-tool :is(.tool-title p,.tool-upsell span){font-size:16px;line-height:1.7}
html.xunl-legacy-tool :is(.crumbs,.tool-more .all){font-size:14px;line-height:1.65}
html.xunl-legacy-tool .tool-body :is(.small,small,.form-text,.msv-caption){font-size:14px;line-height:1.65}
html.xunl-legacy-tool .tool-body :is(label,.form-label){font-size:15px;line-height:1.6}
html.xunl-legacy-tool .tool-body :is(.form-control,.form-select,textarea.form-control){font-size:16px;line-height:1.6;min-height:44px;max-width:100%}
html.xunl-legacy-tool .tool-body :is(.btn,.accordion-button,.nav-link){font-size:15px;min-height:44px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
html.xunl-legacy-tool .tool-body :is(.alert,.accordion-body){font-size:16px;line-height:1.7}
html.xunl-legacy-tool .tool-body .table{font-size:15px;line-height:1.65}
html.xunl-legacy-tool .tool-body .table th{font-size:14px;line-height:1.6}
html.xunl-legacy-tool .tool-body :is(.table-responsive,.table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
html.xunl-legacy-tool .tool-body :is(pre,code){font-size:14px;line-height:1.7;max-width:100%}
html.xunl-legacy-tool .tool-body pre{overflow-x:auto}
html.xunl-legacy-tool .tool-body .row>*{min-width:0}
html.xunl-legacy-tool .tool-body :is(input[type=checkbox],input[type=radio]){width:20px;height:20px}
html.xunl-legacy-tool :is(.xl-bubble,.xl-composer textarea){font-size:16px;line-height:1.75}
html.xunl-legacy-tool :is(.xl-suggest button,.xl-composer button){font-size:14px;min-height:44px}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body :is(.bg-dark,.bg-light,.bg-white){background:#19283f!important;color:var(--ink)!important}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body :is(.alert-light,.alert-secondary){background:#19283f;color:var(--ink);border-color:var(--line-2)}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body .alert-warning{background:var(--warn-soft);color:var(--warn);border-color:#72552c}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body .text-danger{color:var(--bad)!important}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body .text-success{color:var(--ok)!important}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body .text-warning{color:var(--warn)!important}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-bg-type:#19283f;--bs-table-color-type:var(--ink)}
html.xunl-legacy-tool :is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid var(--brand);outline-offset:3px}
@media(max-width:640px){html.xunl-legacy-tool .tool-body{width:calc(100% - 24px)}html.xunl-legacy-tool .tool-body .input-group{flex-wrap:wrap}html.xunl-legacy-tool .tool-body .input-group>.form-control{flex-basis:100%;width:100%}html.xunl-legacy-tool .tool-body .input-group>.btn{flex:1}html.xunl-legacy-tool .tool-title>div{min-width:0}}
@media(prefers-reduced-motion:reduce){html.xunl-legacy-tool :is(button,input,textarea,select){transition:none;animation:none;scroll-behavior:auto}}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body :is(.btn-primary,.btn-success){background:#376dd7;border-color:#376dd7;color:#fff}
html.xunl-legacy-tool[data-xunl-theme=dark] .tool-body :is(.btn-primary,.btn-success):hover{background:#2f63ce;border-color:#2f63ce;color:#fff}
html.xunl-legacy-tool[data-xunl-theme=dark] .pnav .cta .btn-primary{background:#376dd7!important;border-color:#376dd7!important;color:#fff!important}
html.xunl-legacy-tool[data-xunl-theme=dark] .pnav .cta .btn-primary:hover{background:#2f63ce!important;border-color:#2f63ce!important;color:#fff!important}
/* The guidance card is injected after the main form by the shared legacy runtime. */
html.xunl-legacy-tool .legacy-help{font-size:16px;line-height:1.75}
html.xunl-legacy-tool[data-xunl-theme=dark] .legacy-help{background:var(--brand-soft);color:var(--ink);border-color:var(--line-2)}
html.xunl-legacy-tool[data-xunl-theme=dark] .legacy-help :is(h2,p){color:var(--ink)}
html.xunl-legacy-tool[data-xunl-theme=dark] .legacy-help a{color:var(--brand);text-decoration:underline}
